commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Perez Jorge <>
Subject Re: [JXPath] Testing for null values.
Date Thu, 19 Feb 2004 18:12:12 GMT

  I found in the existence of "null()".  So, to 
check if a XPath expression yields null this code will test it 
(beanshell syntax):

  test = ctx.getValue("path/to/a/existent/property = null()");

  But when using ctx.setLenient(true)  this returns boolean false:

  ctx.getValue("path/to/a/non/existent/property = null()");

which I believe it's wrong: it should be true because in lenient mode 
the value of such XPath expresion when some component is null it return 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message