use of de.pdark.decentxml.XMLSource in project sling by apache.
the class TolerantXMLParser method parse.
public static Document parse(final XMLSource xmlSource, final String originDetails) throws IOException {
XMLParser parser = new XMLParser() {
@Override
protected XMLTokenizer createTokenizer(XMLSource source) {
XMLTokenizer tolerantTokenizerIgnoringEntities = new TolerantXMLTokenizer(source, originDetails);
tolerantTokenizerIgnoringEntities.setTreatEntitiesAsText(this.isTreatEntitiesAsText());
return tolerantTokenizerIgnoringEntities;
}
};
return parser.parse(xmlSource);
}
Aggregations