commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Earle <erikea...@yahoo.com>
Subject [JXPath] Condition Not working as Expected
Date Thu, 27 Nov 2003 16:20:35 GMT
I have a Movie bean that has a property:

public Movie {
  ...
  List getGenres(); 
  ...
}

if I have an ArrayList of Movies and I execute an
XPath:

  xPathContext.getValue("/.");

I get back the ArrayList of movies as expected.
However, if I add a condition (to try and filter the
list) I only get the first Movie object matching the
list, some thing like:

  xPathContext.getValue("/.[genre = 'Comedy']");

I know the first thing you'll say is, "use iterate",
but I cant.  I need the filtered List for what I am
doing.

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

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


Mime
View raw message