Package org.jaxen

Examples of org.jaxen.BaseXPath.evaluate()


    protected void assertValueOfXPath(String expected, Object context, String xpathStr) throws JaxenException
    {
        try
        {
            BaseXPath xpath = new BaseXPath(xpathStr, getNavigator());
            Object node = xpath.evaluate(getContext(context));
            String result = StringFunction.evaluate(node,
                    getNavigator());
            log(debug,
                    "  Select :: " + xpathStr);
            log(debug,
View Full Code Here


    protected void assertValueOfXPath(String expected, Object context, String xpathStr)
            throws JaxenException {
        try {
            BaseXPath xpath = new BaseXPath(xpathStr, getNavigator());
            Object node = xpath.evaluate(getContext(context));
            String result = StringFunction.evaluate(node,
                                                    getNavigator());
            log(debug,
                "  Select :: " + xpathStr);
            log(debug,
View Full Code Here

    public void testEvaluateString() throws JaxenException {
       
        BaseXPath xpath = new DOMXPath("string(/*)");
       
        doc.appendChild(doc.createElement("root"));
        String stringValue = (String) xpath.evaluate(doc);
        assertEquals("", stringValue);
       
    }
   
   
View Full Code Here

    public void testEvaluateWithMultiNodeAnswer() throws JaxenException {
       
        BaseXPath xpath = new DOMXPath("(/descendant-or-self::node())");
       
        doc.appendChild(doc.createElement("root"));
        List result = (List) xpath.evaluate(doc);
        assertEquals(2, result.size());
       
    }
   
   
View Full Code Here

    protected void assertValueOfXPath(String expected, Object context, String xpathStr) throws JaxenException
    {
        try
        {
            BaseXPath xpath = new BaseXPath(xpathStr, getNavigator());
            Object node = xpath.evaluate(getContext(context));
            String result = StringFunction.evaluate(node,
                    getNavigator());
            log(debug,
                    "  Select :: " + xpathStr);
            log(debug,
View Full Code Here

    protected void assertValueOfXPath(String expected, Object context, String xpathStr)
            throws JaxenException {
        try {
            BaseXPath xpath = new BaseXPath(xpathStr, getNavigator());
            Object node = xpath.evaluate(getContext(context));
            String result = StringFunction.evaluate(node,
                                                    getNavigator());
            log(debug,
                "  Select :: " + xpathStr);
            log(debug,
View Full Code Here

    protected void assertValueOfXPath(String expected, Object context, String xpathStr)
            throws JaxenException {
        try {
            BaseXPath xpath = new BaseXPath(xpathStr, getNavigator());
            Object node = xpath.evaluate(getContext(context));
            String result = StringFunction.evaluate(node,
                                                    getNavigator());
            log(debug,
                "  Select :: " + xpathStr);
            log(debug,
View Full Code Here

    public void testNaNIsFalse()
      throws JaxenException {
       
        BaseXPath xpath = new DOMXPath("not(0 div 0)");
        Object result = xpath.evaluate(null);
        assertEquals(Boolean.TRUE, result);
       
    }   

    public void testNonEmptyStringIsTrue()
View Full Code Here

        b.appendChild(x3);
        x2.appendChild(doc.createTextNode("fr"));
        x3.appendChild(doc.createTextNode("3"));
        x4.appendChild(doc.createTextNode("4"));
       
        Boolean result = (Boolean) xpath.evaluate(doc);
        assertEquals(Boolean.FALSE, result);
       
    }   

    public void testLangFunctionSelectsNumber()
View Full Code Here

    public void testEvaluateString() throws JaxenException {
       
        BaseXPath xpath = new DOMXPath("string(/*)");
       
        doc.appendChild(doc.createElement("root"));
        String stringValue = (String) xpath.evaluate(doc);
        assertEquals("", stringValue);
       
    }
   
   
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.