Search in sources :

Example 1 with DeclHandler

use of org.xml.sax.ext.DeclHandler in project robovm by robovm.

the class TransformerIdentityImpl method createResultContentHandler.

/**
   * Create a result ContentHandler from a Result object, based
   * on the current OutputProperties.
   *
   * @param outputTarget Where the transform result should go,
   * should not be null.
   *
   * @return A valid ContentHandler that will create the
   * result tree when it is fed SAX events.
   *
   * @throws TransformerException
   */
private void createResultContentHandler(Result outputTarget) throws TransformerException {
    if (outputTarget instanceof SAXResult) {
        SAXResult saxResult = (SAXResult) outputTarget;
        m_resultContentHandler = saxResult.getHandler();
        m_resultLexicalHandler = saxResult.getLexicalHandler();
        if (m_resultContentHandler instanceof Serializer) {
            // Dubious but needed, I think.
            m_serializer = (Serializer) m_resultContentHandler;
        }
    } else if (outputTarget instanceof DOMResult) {
        DOMResult domResult = (DOMResult) outputTarget;
        Node outputNode = domResult.getNode();
        Node nextSibling = domResult.getNextSibling();
        Document doc;
        short type;
        if (null != outputNode) {
            type = outputNode.getNodeType();
            doc = (Node.DOCUMENT_NODE == type) ? (Document) outputNode : outputNode.getOwnerDocument();
        } else {
            try {
                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                dbf.setNamespaceAware(true);
                if (m_isSecureProcessing) {
                    try {
                        dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
                    } catch (ParserConfigurationException pce) {
                    }
                }
                DocumentBuilder db = dbf.newDocumentBuilder();
                doc = db.newDocument();
            } catch (ParserConfigurationException pce) {
                throw new TransformerException(pce);
            }
            outputNode = doc;
            type = outputNode.getNodeType();
            ((DOMResult) outputTarget).setNode(outputNode);
        }
        DOMBuilder domBuilder = (Node.DOCUMENT_FRAGMENT_NODE == type) ? new DOMBuilder(doc, (DocumentFragment) outputNode) : new DOMBuilder(doc, outputNode);
        if (nextSibling != null)
            domBuilder.setNextSibling(nextSibling);
        m_resultContentHandler = domBuilder;
        m_resultLexicalHandler = domBuilder;
    } else if (outputTarget instanceof StreamResult) {
        StreamResult sresult = (StreamResult) outputTarget;
        try {
            Serializer serializer = SerializerFactory.getSerializer(m_outputFormat.getProperties());
            m_serializer = serializer;
            if (null != sresult.getWriter())
                serializer.setWriter(sresult.getWriter());
            else if (null != sresult.getOutputStream())
                serializer.setOutputStream(sresult.getOutputStream());
            else if (null != sresult.getSystemId()) {
                String fileURL = sresult.getSystemId();
                if (fileURL.startsWith("file:///")) {
                    if (fileURL.substring(8).indexOf(":") > 0) {
                        fileURL = fileURL.substring(8);
                    } else {
                        fileURL = fileURL.substring(7);
                    }
                } else if (fileURL.startsWith("file:/")) {
                    if (fileURL.substring(6).indexOf(":") > 0) {
                        fileURL = fileURL.substring(6);
                    } else {
                        fileURL = fileURL.substring(5);
                    }
                }
                m_outputStream = new java.io.FileOutputStream(fileURL);
                serializer.setOutputStream(m_outputStream);
            } else
                //"No output specified!");
                throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_NO_OUTPUT_SPECIFIED, null));
            m_resultContentHandler = serializer.asContentHandler();
        } catch (IOException ioe) {
            throw new TransformerException(ioe);
        }
    } else {
        //"Can't transform to a Result of type "
        throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, new Object[] { outputTarget.getClass().getName() }));
    // + outputTarget.getClass().getName()
    // + "!");
    }
    if (m_resultContentHandler instanceof DTDHandler)
        m_resultDTDHandler = (DTDHandler) m_resultContentHandler;
    if (m_resultContentHandler instanceof DeclHandler)
        m_resultDeclHandler = (DeclHandler) m_resultContentHandler;
    if (m_resultContentHandler instanceof LexicalHandler)
        m_resultLexicalHandler = (LexicalHandler) m_resultContentHandler;
}
Also used : DOMResult(javax.xml.transform.dom.DOMResult) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) StreamResult(javax.xml.transform.stream.StreamResult) Node(org.w3c.dom.Node) IOException(java.io.IOException) Document(org.w3c.dom.Document) DOMBuilder(org.apache.xml.utils.DOMBuilder) DeclHandler(org.xml.sax.ext.DeclHandler) SAXResult(javax.xml.transform.sax.SAXResult) DocumentBuilder(javax.xml.parsers.DocumentBuilder) LexicalHandler(org.xml.sax.ext.LexicalHandler) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) DTDHandler(org.xml.sax.DTDHandler) TransformerException(javax.xml.transform.TransformerException) Serializer(org.apache.xml.serializer.Serializer)

Example 2 with DeclHandler

use of org.xml.sax.ext.DeclHandler in project robovm by robovm.

the class TransformerIdentityImpl method transform.

/**
   * Process the source tree to the output result.
   * @param source  The input for the source tree.
   *
   * @param outputTarget The output target.
   *
   * @throws TransformerException If an unrecoverable error occurs
   * during the course of the transformation.
   */
public void transform(Source source, Result outputTarget) throws TransformerException {
    createResultContentHandler(outputTarget);
    /*
     * According to JAXP1.2, new SAXSource()/StreamSource()
     * should create an empty input tree, with a default root node. 
     * new DOMSource()creates an empty document using DocumentBuilder.
     * newDocument(); Use DocumentBuilder.newDocument() for all 3 situations,
     * since there is no clear spec. how to create an empty tree when
     * both SAXSource() and StreamSource() are used.
     */
    if ((source instanceof StreamSource && source.getSystemId() == null && ((StreamSource) source).getInputStream() == null && ((StreamSource) source).getReader() == null) || (source instanceof SAXSource && ((SAXSource) source).getInputSource() == null && ((SAXSource) source).getXMLReader() == null) || (source instanceof DOMSource && ((DOMSource) source).getNode() == null)) {
        try {
            DocumentBuilderFactory builderF = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = builderF.newDocumentBuilder();
            String systemID = source.getSystemId();
            source = new DOMSource(builder.newDocument());
            // Copy system ID from original, empty Source to new Source
            if (systemID != null) {
                source.setSystemId(systemID);
            }
        } catch (ParserConfigurationException e) {
            throw new TransformerException(e.getMessage());
        }
    }
    try {
        if (source instanceof DOMSource) {
            DOMSource dsource = (DOMSource) source;
            m_systemID = dsource.getSystemId();
            Node dNode = dsource.getNode();
            if (null != dNode) {
                try {
                    if (dNode.getNodeType() == Node.ATTRIBUTE_NODE)
                        this.startDocument();
                    try {
                        if (dNode.getNodeType() == Node.ATTRIBUTE_NODE) {
                            String data = dNode.getNodeValue();
                            char[] chars = data.toCharArray();
                            characters(chars, 0, chars.length);
                        } else {
                            org.apache.xml.serializer.TreeWalker walker;
                            walker = new org.apache.xml.serializer.TreeWalker(this, m_systemID);
                            walker.traverse(dNode);
                        }
                    } finally {
                        if (dNode.getNodeType() == Node.ATTRIBUTE_NODE)
                            this.endDocument();
                    }
                } catch (SAXException se) {
                    throw new TransformerException(se);
                }
                return;
            } else {
                String messageStr = XSLMessages.createMessage(XSLTErrorResources.ER_ILLEGAL_DOMSOURCE_INPUT, null);
                throw new IllegalArgumentException(messageStr);
            }
        }
        InputSource xmlSource = SAXSource.sourceToInputSource(source);
        if (null == xmlSource) {
            //"Can't transform a Source of type "
            throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_CANNOT_TRANSFORM_SOURCE_TYPE, new Object[] { source.getClass().getName() }));
        //+ source.getClass().getName() + "!");
        }
        if (null != xmlSource.getSystemId())
            m_systemID = xmlSource.getSystemId();
        XMLReader reader = null;
        boolean managedReader = false;
        try {
            if (source instanceof SAXSource) {
                reader = ((SAXSource) source).getXMLReader();
            }
            if (null == reader) {
                try {
                    reader = XMLReaderManager.getInstance().getXMLReader();
                    managedReader = true;
                } catch (SAXException se) {
                    throw new TransformerException(se);
                }
            } else {
                try {
                    reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
                } catch (org.xml.sax.SAXException se) {
                // We don't care.
                }
            }
            // Get the input content handler, which will handle the 
            // parse events and create the source tree. 
            ContentHandler inputHandler = this;
            reader.setContentHandler(inputHandler);
            if (inputHandler instanceof org.xml.sax.DTDHandler)
                reader.setDTDHandler((org.xml.sax.DTDHandler) inputHandler);
            try {
                if (inputHandler instanceof org.xml.sax.ext.LexicalHandler)
                    reader.setProperty("http://xml.org/sax/properties/lexical-handler", inputHandler);
                if (inputHandler instanceof org.xml.sax.ext.DeclHandler)
                    reader.setProperty("http://xml.org/sax/properties/declaration-handler", inputHandler);
            } catch (org.xml.sax.SAXException se) {
            }
            try {
                if (inputHandler instanceof org.xml.sax.ext.LexicalHandler)
                    reader.setProperty("http://xml.org/sax/handlers/LexicalHandler", inputHandler);
                if (inputHandler instanceof org.xml.sax.ext.DeclHandler)
                    reader.setProperty("http://xml.org/sax/handlers/DeclHandler", inputHandler);
            } catch (org.xml.sax.SAXNotRecognizedException snre) {
            }
            reader.parse(xmlSource);
        } catch (org.apache.xml.utils.WrappedRuntimeException wre) {
            Throwable throwable = wre.getException();
            while (throwable instanceof org.apache.xml.utils.WrappedRuntimeException) {
                throwable = ((org.apache.xml.utils.WrappedRuntimeException) throwable).getException();
            }
            throw new TransformerException(wre.getException());
        } catch (org.xml.sax.SAXException se) {
            throw new TransformerException(se);
        } catch (IOException ioe) {
            throw new TransformerException(ioe);
        } finally {
            if (managedReader) {
                XMLReaderManager.getInstance().releaseXMLReader(reader);
            }
        }
    } finally {
        if (null != m_outputStream) {
            try {
                m_outputStream.close();
            } catch (IOException ioe) {
            }
            m_outputStream = null;
        }
    }
}
Also used : DOMSource(javax.xml.transform.dom.DOMSource) InputSource(org.xml.sax.InputSource) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) Node(org.w3c.dom.Node) ContentHandler(org.xml.sax.ContentHandler) SAXException(org.xml.sax.SAXException) DeclHandler(org.xml.sax.ext.DeclHandler) LexicalHandler(org.xml.sax.ext.LexicalHandler) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) TransformerException(javax.xml.transform.TransformerException) XMLReader(org.xml.sax.XMLReader) StreamSource(javax.xml.transform.stream.StreamSource) IOException(java.io.IOException) SAXSource(javax.xml.transform.sax.SAXSource) DocumentBuilder(javax.xml.parsers.DocumentBuilder) SAXException(org.xml.sax.SAXException) DTDHandler(org.xml.sax.DTDHandler)

Example 3 with DeclHandler

use of org.xml.sax.ext.DeclHandler in project j2objc by google.

the class TransformerIdentityImpl method transform.

/**
 * Process the source tree to the output result.
 * @param source  The input for the source tree.
 *
 * @param outputTarget The output target.
 *
 * @throws TransformerException If an unrecoverable error occurs
 * during the course of the transformation.
 */
public void transform(Source source, Result outputTarget) throws TransformerException {
    createResultContentHandler(outputTarget);
    /*
     * According to JAXP1.2, new SAXSource()/StreamSource()
     * should create an empty input tree, with a default root node. 
     * new DOMSource()creates an empty document using DocumentBuilder.
     * newDocument(); Use DocumentBuilder.newDocument() for all 3 situations,
     * since there is no clear spec. how to create an empty tree when
     * both SAXSource() and StreamSource() are used.
     */
    if ((source instanceof StreamSource && source.getSystemId() == null && ((StreamSource) source).getInputStream() == null && ((StreamSource) source).getReader() == null) || (source instanceof SAXSource && ((SAXSource) source).getInputSource() == null && ((SAXSource) source).getXMLReader() == null) || (source instanceof DOMSource && ((DOMSource) source).getNode() == null)) {
        try {
            DocumentBuilderFactory builderF = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = builderF.newDocumentBuilder();
            String systemID = source.getSystemId();
            source = new DOMSource(builder.newDocument());
            // Copy system ID from original, empty Source to new Source
            if (systemID != null) {
                source.setSystemId(systemID);
            }
        } catch (ParserConfigurationException e) {
            throw new TransformerException(e.getMessage());
        }
    }
    try {
        if (source instanceof DOMSource) {
            DOMSource dsource = (DOMSource) source;
            m_systemID = dsource.getSystemId();
            Node dNode = dsource.getNode();
            if (null != dNode) {
                try {
                    if (dNode.getNodeType() == Node.ATTRIBUTE_NODE)
                        this.startDocument();
                    try {
                        if (dNode.getNodeType() == Node.ATTRIBUTE_NODE) {
                            String data = dNode.getNodeValue();
                            char[] chars = data.toCharArray();
                            characters(chars, 0, chars.length);
                        } else {
                            org.apache.xml.serializer.TreeWalker walker;
                            walker = new org.apache.xml.serializer.TreeWalker(this, m_systemID);
                            walker.traverse(dNode);
                        }
                    } finally {
                        if (dNode.getNodeType() == Node.ATTRIBUTE_NODE)
                            this.endDocument();
                    }
                } catch (SAXException se) {
                    throw new TransformerException(se);
                }
                return;
            } else {
                String messageStr = XSLMessages.createMessage(XSLTErrorResources.ER_ILLEGAL_DOMSOURCE_INPUT, null);
                throw new IllegalArgumentException(messageStr);
            }
        }
        InputSource xmlSource = SAXSource.sourceToInputSource(source);
        if (null == xmlSource) {
            // "Can't transform a Source of type "
            throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_CANNOT_TRANSFORM_SOURCE_TYPE, new Object[] { source.getClass().getName() }));
        // + source.getClass().getName() + "!");
        }
        if (null != xmlSource.getSystemId())
            m_systemID = xmlSource.getSystemId();
        XMLReader reader = null;
        boolean managedReader = false;
        try {
            if (source instanceof SAXSource) {
                reader = ((SAXSource) source).getXMLReader();
            }
            if (null == reader) {
                try {
                    reader = XMLReaderManager.getInstance().getXMLReader();
                    managedReader = true;
                } catch (SAXException se) {
                    throw new TransformerException(se);
                }
            } else {
                try {
                    reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
                } catch (org.xml.sax.SAXException se) {
                // We don't care.
                }
            }
            // Get the input content handler, which will handle the
            // parse events and create the source tree.
            ContentHandler inputHandler = this;
            reader.setContentHandler(inputHandler);
            if (inputHandler instanceof org.xml.sax.DTDHandler)
                reader.setDTDHandler((org.xml.sax.DTDHandler) inputHandler);
            try {
                if (inputHandler instanceof org.xml.sax.ext.LexicalHandler)
                    reader.setProperty("http://xml.org/sax/properties/lexical-handler", inputHandler);
                if (inputHandler instanceof org.xml.sax.ext.DeclHandler)
                    reader.setProperty("http://xml.org/sax/properties/declaration-handler", inputHandler);
            } catch (org.xml.sax.SAXException se) {
            }
            try {
                if (inputHandler instanceof org.xml.sax.ext.LexicalHandler)
                    reader.setProperty("http://xml.org/sax/handlers/LexicalHandler", inputHandler);
                if (inputHandler instanceof org.xml.sax.ext.DeclHandler)
                    reader.setProperty("http://xml.org/sax/handlers/DeclHandler", inputHandler);
            } catch (org.xml.sax.SAXNotRecognizedException snre) {
            }
            reader.parse(xmlSource);
        } catch (org.apache.xml.utils.WrappedRuntimeException wre) {
            Throwable throwable = wre.getException();
            while (throwable instanceof org.apache.xml.utils.WrappedRuntimeException) {
                throwable = ((org.apache.xml.utils.WrappedRuntimeException) throwable).getException();
            }
            throw new TransformerException(wre.getException());
        } catch (org.xml.sax.SAXException se) {
            throw new TransformerException(se);
        } catch (IOException ioe) {
            throw new TransformerException(ioe);
        } finally {
            if (managedReader) {
                XMLReaderManager.getInstance().releaseXMLReader(reader);
            }
        }
    } finally {
        if (null != m_outputStream) {
            try {
                m_outputStream.close();
            } catch (IOException ioe) {
            }
            m_outputStream = null;
        }
    }
}
Also used : DOMSource(javax.xml.transform.dom.DOMSource) InputSource(org.xml.sax.InputSource) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) Node(org.w3c.dom.Node) ContentHandler(org.xml.sax.ContentHandler) SAXException(org.xml.sax.SAXException) DeclHandler(org.xml.sax.ext.DeclHandler) LexicalHandler(org.xml.sax.ext.LexicalHandler) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) TransformerException(javax.xml.transform.TransformerException) XMLReader(org.xml.sax.XMLReader) StreamSource(javax.xml.transform.stream.StreamSource) IOException(java.io.IOException) SAXSource(javax.xml.transform.sax.SAXSource) DocumentBuilder(javax.xml.parsers.DocumentBuilder) SAXException(org.xml.sax.SAXException) DTDHandler(org.xml.sax.DTDHandler)

Example 4 with DeclHandler

use of org.xml.sax.ext.DeclHandler in project j2objc by google.

the class TransformerIdentityImpl method createResultContentHandler.

/**
 * Create a result ContentHandler from a Result object, based
 * on the current OutputProperties.
 *
 * @param outputTarget Where the transform result should go,
 * should not be null.
 *
 * @return A valid ContentHandler that will create the
 * result tree when it is fed SAX events.
 *
 * @throws TransformerException
 */
private void createResultContentHandler(Result outputTarget) throws TransformerException {
    if (outputTarget instanceof SAXResult) {
        SAXResult saxResult = (SAXResult) outputTarget;
        m_resultContentHandler = saxResult.getHandler();
        m_resultLexicalHandler = saxResult.getLexicalHandler();
        if (m_resultContentHandler instanceof Serializer) {
            // Dubious but needed, I think.
            m_serializer = (Serializer) m_resultContentHandler;
        }
    } else if (outputTarget instanceof DOMResult) {
        DOMResult domResult = (DOMResult) outputTarget;
        Node outputNode = domResult.getNode();
        Node nextSibling = domResult.getNextSibling();
        Document doc;
        short type;
        if (null != outputNode) {
            type = outputNode.getNodeType();
            doc = (Node.DOCUMENT_NODE == type) ? (Document) outputNode : outputNode.getOwnerDocument();
        } else {
            try {
                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                dbf.setNamespaceAware(true);
                if (m_isSecureProcessing) {
                    try {
                        dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
                    } catch (ParserConfigurationException pce) {
                    }
                }
                DocumentBuilder db = dbf.newDocumentBuilder();
                doc = db.newDocument();
            } catch (ParserConfigurationException pce) {
                throw new TransformerException(pce);
            }
            outputNode = doc;
            type = outputNode.getNodeType();
            ((DOMResult) outputTarget).setNode(outputNode);
        }
        DOMBuilder domBuilder = (Node.DOCUMENT_FRAGMENT_NODE == type) ? new DOMBuilder(doc, (DocumentFragment) outputNode) : new DOMBuilder(doc, outputNode);
        if (nextSibling != null)
            domBuilder.setNextSibling(nextSibling);
        m_resultContentHandler = domBuilder;
        m_resultLexicalHandler = domBuilder;
    } else if (outputTarget instanceof StreamResult) {
        StreamResult sresult = (StreamResult) outputTarget;
        try {
            Serializer serializer = SerializerFactory.getSerializer(m_outputFormat.getProperties());
            m_serializer = serializer;
            if (null != sresult.getWriter())
                serializer.setWriter(sresult.getWriter());
            else if (null != sresult.getOutputStream())
                serializer.setOutputStream(sresult.getOutputStream());
            else if (null != sresult.getSystemId()) {
                String fileURL = sresult.getSystemId();
                if (fileURL.startsWith("file:///")) {
                    if (fileURL.substring(8).indexOf(":") > 0) {
                        fileURL = fileURL.substring(8);
                    } else {
                        fileURL = fileURL.substring(7);
                    }
                } else if (fileURL.startsWith("file:/")) {
                    if (fileURL.substring(6).indexOf(":") > 0) {
                        fileURL = fileURL.substring(6);
                    } else {
                        fileURL = fileURL.substring(5);
                    }
                }
                m_outputStream = new java.io.FileOutputStream(fileURL);
                serializer.setOutputStream(m_outputStream);
            } else
                // "No output specified!");
                throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_NO_OUTPUT_SPECIFIED, null));
            m_resultContentHandler = serializer.asContentHandler();
        } catch (IOException ioe) {
            throw new TransformerException(ioe);
        }
    } else {
        // "Can't transform to a Result of type "
        throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, new Object[] { outputTarget.getClass().getName() }));
    // + outputTarget.getClass().getName()
    // + "!");
    }
    if (m_resultContentHandler instanceof DTDHandler)
        m_resultDTDHandler = (DTDHandler) m_resultContentHandler;
    if (m_resultContentHandler instanceof DeclHandler)
        m_resultDeclHandler = (DeclHandler) m_resultContentHandler;
    if (m_resultContentHandler instanceof LexicalHandler)
        m_resultLexicalHandler = (LexicalHandler) m_resultContentHandler;
}
Also used : DOMResult(javax.xml.transform.dom.DOMResult) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) StreamResult(javax.xml.transform.stream.StreamResult) Node(org.w3c.dom.Node) IOException(java.io.IOException) Document(org.w3c.dom.Document) DOMBuilder(org.apache.xml.utils.DOMBuilder) DeclHandler(org.xml.sax.ext.DeclHandler) SAXResult(javax.xml.transform.sax.SAXResult) DocumentBuilder(javax.xml.parsers.DocumentBuilder) LexicalHandler(org.xml.sax.ext.LexicalHandler) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) DTDHandler(org.xml.sax.DTDHandler) TransformerException(javax.xml.transform.TransformerException) Serializer(org.apache.xml.serializer.Serializer)

Aggregations

IOException (java.io.IOException)4 DocumentBuilder (javax.xml.parsers.DocumentBuilder)4 DocumentBuilderFactory (javax.xml.parsers.DocumentBuilderFactory)4 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)4 TransformerException (javax.xml.transform.TransformerException)4 Node (org.w3c.dom.Node)4 DTDHandler (org.xml.sax.DTDHandler)4 DeclHandler (org.xml.sax.ext.DeclHandler)4 LexicalHandler (org.xml.sax.ext.LexicalHandler)4 DOMResult (javax.xml.transform.dom.DOMResult)2 DOMSource (javax.xml.transform.dom.DOMSource)2 SAXResult (javax.xml.transform.sax.SAXResult)2 SAXSource (javax.xml.transform.sax.SAXSource)2 StreamResult (javax.xml.transform.stream.StreamResult)2 StreamSource (javax.xml.transform.stream.StreamSource)2 Serializer (org.apache.xml.serializer.Serializer)2 DOMBuilder (org.apache.xml.utils.DOMBuilder)2 Document (org.w3c.dom.Document)2 ContentHandler (org.xml.sax.ContentHandler)2 InputSource (org.xml.sax.InputSource)2