Package org.mule.module.xml.expression

Examples of org.mule.module.xml.expression.JXPathExpressionEvaluator.evaluate()


        final String xpathExpression = "//f:table/f:name";

        DefaultMuleMessage msg = new DefaultMuleMessage(XML_USING_UNDEFINED_NAMESPACE, muleContext);

        JXPathExpressionEvaluator e = new JXPathExpressionEvaluator();
        Object value = e.evaluate(xpathExpression, msg);
        assertNull(value);
    }

    @Test
    public void testXmlWithInvalidNameSpaceIfNameSpaceAliasIsDefined() throws MalformedURLException, RegistrationException
View Full Code Here


        DefaultMuleMessage msg = new DefaultMuleMessage(XML_USING_UNDEFINED_NAMESPACE, muleContext);

        JXPathExpressionEvaluator e = new JXPathExpressionEvaluator();
        e.setMuleContext(muleContext);

        Object value = e.evaluate("//f:table/f:name", msg);
        assertTrue(value instanceof String);
        assertEquals("African Coffee Table", value);
    }
}
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.