commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Earle <erikea...@yahoo.com>
Subject [JXPath] Using JXPath as a filter
Date Mon, 01 Dec 2003 20:57:29 GMT
I'm trying to use JXPath to filter a java.util.List of
beans so that I get a List (getting back the List is
the important part).

With an xpath statement like:

  getValue("/.");

I get back the java.util.List I created the context
on, perfect.  BUT...if I want a list of all the beans
with a property 'value=1', I say this:

  getValue("/.[value=1]"); 

(right?)

I only get back the first bean in the list, not the
filtered List (like I expected).

I cannot use the iterate() method, I need the
'filtered' List object back.

..anyone...Bueller?

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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


Mime
View raw message