Package org.jaxen.dom4j

Examples of org.jaxen.dom4j.Dom4jXPath.booleanValueOf()


    public void testAsBoolean() throws JaxenException, DocumentException
    {
        XPath xpath = new Dom4jXPath( "/root/a = 'a'" );
        SAXReader reader = new SAXReader();
        Document doc = reader.read( "xml/simple.xml" );
        boolean answer = xpath.booleanValueOf( doc );
        assertTrue( "Xpath worked: " + xpath, answer );
        xpath = new Dom4jXPath( "'a' = 'b'" );
        answer = xpath.booleanValueOf( doc );
        assertTrue( "XPath should return false: " + xpath, ! answer );
    }
View Full Code Here


        SAXReader reader = new SAXReader();
        Document doc = reader.read( "xml/simple.xml" );
        boolean answer = xpath.booleanValueOf( doc );
        assertTrue( "Xpath worked: " + xpath, answer );
        xpath = new Dom4jXPath( "'a' = 'b'" );
        answer = xpath.booleanValueOf( doc );
        assertTrue( "XPath should return false: " + xpath, ! answer );
    }
   
    public void testJaxen20AttributeNamespaceNodes() throws JaxenException
    {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.