use of com.enonic.xp.xml.parser.XmlPartDescriptorParser in project xp by enonic.
the class PartDescriptorLoader method parseXml.
private void parseXml(final Resource resource, final PartDescriptor.Builder builder) {
try {
final XmlPartDescriptorParser parser = new XmlPartDescriptorParser();
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 part descriptor [" + resource.getUrl() + "]: " + e.getMessage());
}
}
Aggregations