Search in sources :

Example 1 with XmlLayoutDescriptorParser

use of com.enonic.xp.xml.parser.XmlLayoutDescriptorParser in project xp by enonic.

the class LayoutDescriptorLoader method parseXml.

private void parseXml(final Resource resource, final LayoutDescriptor.Builder builder) {
    try {
        final XmlLayoutDescriptorParser parser = new XmlLayoutDescriptorParser();
        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 layout descriptor [" + resource.getUrl() + "]: " + e.getMessage());
    }
}
Also used : XmlLayoutDescriptorParser(com.enonic.xp.xml.parser.XmlLayoutDescriptorParser) XmlException(com.enonic.xp.xml.XmlException) XmlException(com.enonic.xp.xml.XmlException)

Aggregations

XmlException (com.enonic.xp.xml.XmlException)1 XmlLayoutDescriptorParser (com.enonic.xp.xml.parser.XmlLayoutDescriptorParser)1