use of com.enonic.xp.xml.parser.XmlPageDescriptorParser 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.parser.XmlPageDescriptorParser in project xp by enonic.
the class RenderBaseHandlerTest method parseXml.
private void parseXml(final ApplicationKey applicationKey, final PageDescriptor.Builder builder, final String xml) {
final XmlPageDescriptorParser parser = new XmlPageDescriptorParser();
parser.builder(builder);
parser.currentApplication(applicationKey);
parser.source(xml);
parser.parse();
}
Aggregations