Code example for DOMResult

Methods: getNode, getSystemId

0
        return new DOMSource(node);
    } 
 
    public Source toDOMSource(StaxSource source) throws ParserConfigurationException, IOException, SAXException, TransformerException {
        Transformer transformer = createTransfomer();
        DOMResult result = new DOMResult();
        transformer.transform(source, result);
        return new DOMSource(result.getNode(), result.getSystemId());
    } 
 
    /** 
     * Converts the source instance to a {@link SAXSource} or returns null if 
     * the conversion is not supported (making it easy to derive from this class 
     * to add new kinds of conversion). 
     */ 
    public SAXSource toSAXSource(Source source) throws IOException, SAXException, TransformerException {
        if (source instanceof SAXSource) {
            return (SAXSource) source;
        } else if (source instanceof DOMSource) {
            return toSAXSourceFromDOM((DOMSource) source);
        } else if (source instanceof StreamSource) {