Search in sources :

Example 1 with ContentHandlerXmlHandler

use of org.apache.axiom.core.stream.sax.ContentHandlerXmlHandler 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) {
        throw (SAXException) ex.getCause();
    }
}
Also used : CoreElement(org.apache.axiom.core.CoreElement) NamespaceContextPreservationFilterHandler(org.apache.axiom.om.impl.stream.NamespaceContextPreservationFilterHandler) ContentHandlerXmlHandler(org.apache.axiom.core.stream.sax.ContentHandlerXmlHandler) XmlHandler(org.apache.axiom.core.stream.XmlHandler) CoreModelException(org.apache.axiom.core.CoreModelException) ContentHandlerXmlHandler(org.apache.axiom.core.stream.sax.ContentHandlerXmlHandler) SAXException(org.xml.sax.SAXException) StreamException(org.apache.axiom.core.stream.StreamException)

Aggregations

CoreElement (org.apache.axiom.core.CoreElement)1 CoreModelException (org.apache.axiom.core.CoreModelException)1 StreamException (org.apache.axiom.core.stream.StreamException)1 XmlHandler (org.apache.axiom.core.stream.XmlHandler)1 ContentHandlerXmlHandler (org.apache.axiom.core.stream.sax.ContentHandlerXmlHandler)1 NamespaceContextPreservationFilterHandler (org.apache.axiom.om.impl.stream.NamespaceContextPreservationFilterHandler)1 SAXException (org.xml.sax.SAXException)1