use of com.enonic.xp.xml.XmlException in project xp by enonic.
the class PageDescriptorServiceImpl method parseXml.
private void parseXml(final Resource resource, final PageDescriptor.Builder builder) {
try {
final XmlPageDescriptorParser parser = new XmlPageDescriptorParser();
parser.builder(builder);
parser.currentApplication(resource.getKey().getApplicationKey());
parser.source(resource.readString());
parser.parse();
} catch (final Exception e) {
throw new XmlException(e, "Could not load page descriptor [" + resource.getUrl() + "]: " + e.getMessage());
}
}
use of com.enonic.xp.xml.XmlException in project xp by enonic.
the class IdProviderDescriptorServiceImpl method parseXml.
private void parseXml(final Resource resource, final IdProviderDescriptor.Builder builder) {
try {
final XmlIdProviderDescriptorParser parser = new XmlIdProviderDescriptorParser();
parser.builder(builder);
parser.currentApplication(resource.getKey().getApplicationKey());
parser.source(resource.readString());
parser.parse();
} catch (final Exception e) {
throw new XmlException(e, "Could not load auth descriptor [" + resource.getUrl() + "]: " + e.getMessage());
}
}
Aggregations