You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jasmina Desai <ja...@yahoo.com> on 2008/01/17 19:40:07 UTC

Test null properties in JXPATH

Hi,

I have several objects of an objectwhich I need to
filter using JXPATH by checking a particular property
in that object.

I want to get only those instances which have avalid
value of a property. The property could be null also.

In such a case how should my xpath look like to filter
out only those instances which have 
property != null. 

For eg: object/property != null

How to check for null properties in objects using
jxpath?

Thanks in advance!

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [jxpath] Test null properties

Posted by Matt Benson <gu...@yahoo.com>.
Note the subject change; on the Commons mailing lists
the subject line should be prefaced by the
bracket-delimited component name.

--- Jasmina Desai <ja...@yahoo.com> wrote:

> Hi,
> 
> I have several objects of an objectwhich I need to
> filter using JXPATH by checking a particular
> property
> in that object.
> 
> I want to get only those instances which have avalid
> value of a property. The property could be null
> also.
> 
> In such a case how should my xpath look like to
> filter
> out only those instances which have 
> property != null. 
> 
> For eg: object/property != null
> 
> How to check for null properties in objects using
> jxpath?

I've been playing with this for awhile but with a pure
xpath this is somewhat difficult.  If it were me I'd
probably use a custom function.

HTH,
Matt

> 
> Thanks in advance!
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@commons.apache.org
> For additional commands, e-mail:
> user-help@commons.apache.org
> 
> 



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org