commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Rouvoy <romain.rou...@lifl.fr>
Subject [jxpath] Navigating across Lists
Date Mon, 16 May 2011 09:51:42 GMT
Hi,

I'm using JXPath to query a graph of beans, which are heavily using lists, e.g.:
> public class A {
> 	List<B> getB() {...}
> }
> 
> public class B {
> 	String getName() {...}
> 	List<C> getC() {...}
> }
> 
> public class C {
> 	String getName() {...}
> }

However, when I'm querying this graph of beans, the following request does not match any elements
(while it should return several elements):
> org.apache.commons.jxpath.JXPathContext.newContext(new A());
> context.getValue("b[@name='foo']/c/name");

Any idea? Does JXPath support navigation within lists?

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


Mime
View raw message