Code example for DOMResult

Methods: getNode

0
     * @return the Document created by the copy-of transform. 
     */ 
    protected Document getXPathResultAsDocument(String select,
                                                Document document)
        throws ConfigurationException, TransformerException, XpathException { 
        DOMResult result = new DOMResult();
        performTransform(getCopyTransformation(select), document, result);
        return (Document) result.getNode();
    } 
 
    /** 
     * Execute the specified xpath syntax <code>select</code> expression 
     * on the specified document and return the list of nodes (could have 
     * length zero) that match 
     * @param select 
     * @param document 
     * @return list of matching nodes 
     */ 
    public NodeList getMatchingNodes(String select, Document document)
        throws ConfigurationException, XpathException { 
        try {