Details
-
Feature Request
-
Resolution: Done
-
Major
-
2.10.0-fuse-71-047
-
None
-
None
Description
Hi,
If I modify JXPathFilterTest [1] to not include a value:
//filter().jxpath("in/body/name2='James'").
filter().jxpath("in/body/name2").
I receive the following error:
Caused by: org.apache.commons.jxpath.JXPathNotFoundException: No value for xpath: in/body/name2
It seems JXPath has a way to avoid throwing this error by using lenient mode [2], i.e:
context.setLenient(true);
I quickly updated ./src/main/java/org/apache/camel/language/jxpath/JXPathExpression.java to set this value to true and indeed the test case passes. Can we add a way for users to set this option?
Susan
[1] http://svn.apache.org/repos/asf/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/JXPathFilterTest.java
[2] http://commons.apache.org/proper/commons-jxpath//users-guide.html#Lenient_Mode