use of org.apache.axiom.om.impl.stream.NamespaceContextPreservationFilterHandler in project webservices-axiom by apache.
the class XMLReaderImpl method parse.
private void parse() throws SAXException {
XmlHandler handler = new ContentHandlerXmlHandler(contentHandler, lexicalHandler);
CoreElement contextElement = root.getContextElement();
if (contextElement != null) {
handler = new NamespaceContextPreservationFilterHandler(handler, contextElement);
}
try {
root.internalSerialize(handler, cache);
} catch (CoreModelException ex) {
throw new SAXException(ex);
} catch (StreamException ex) {
Throwable cause = ex.getCause();
if (cause instanceof SAXException) {
throw (SAXException) cause;
} else if (cause instanceof Exception) {
throw new SAXException((Exception) cause);
} else {
throw new SAXException(ex);
}
}
}
Aggregations