Package org.custommonkey.xmlunit.exceptions

Examples of org.custommonkey.xmlunit.exceptions.XpathException


            tf.setErrorListener(el);
            Transformer transformer = tf.newTransformer(source);
            // Issue 1985229 says Xalan-J 2.7.0 may return null for
            // illegal input
            if (transformer == null) {
                throw new XpathException("failed to obtain an XSLT transformer"
                                         + " for XPath expression.");
            }
            transformer.setErrorListener(el);
            transformer.transform(new DOMSource(document), result);
        } catch (javax.xml.transform.TransformerConfigurationException ex) {
View Full Code Here


    public NodeList getMatchingNodes(String select, Document document)
        throws ConfigurationException, XpathException {
        try {
            return getXPathResultNode(select, document).getChildNodes();
        } catch (TransformerException ex) {
            throw new XpathException("Failed to apply stylesheet", ex);
        }
    }
View Full Code Here

            StringWriter writer = new StringWriter();
            StreamResult result = new StreamResult(writer);
            performTransform(getValueTransformation(select), document, result);
            return writer.toString();
        } catch (TransformerException ex) {
            throw new XpathException("Failed to apply stylesheet", ex);
        }
    }
View Full Code Here

        throws XpathException {
        try {
            return (NodeList) xpath.evaluate(select, document,
                                             XPathConstants.NODESET);
        } catch (XPathExpressionException ex) {
            throw new XpathException(ex);
        }
    }
View Full Code Here

    public String evaluate(String select, Document document)
        throws XpathException {
        try {
            return xpath.evaluate(select, document);
        } catch (XPathExpressionException ex) {
            throw new XpathException(ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.custommonkey.xmlunit.exceptions.XpathException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.