You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Serge Simard <se...@cgi.com> on 2004/11/03 21:12:59 UTC
Xpath with predicates : any success???
I have seen many report that they cannot get selectPath() to return anything
when using predicates in the query string.
I have not seen anyone report a success after the many suggestions posters
have made.
Yes, I have the three jars on my classpath, I am not using a namespace on my
query and my xml only has one default namespace.
I am able to get results when writing so-called "simple" query for the
XmlBeans implementation, such as:
String query = " declare namespace o='http://www.ccc.com/aaa/bbb
./o:aaa/o:bbb/o:ccc/o:ddd";
But since I am using a query with predicates, I have rewritten it for
Jaxen-XmlBean limitation, i.e. removing any namespace reference, but I don't
get anything when predicates are added to the query.
So, anyone actually got a so-called complex query to work. Care to share
your most complex query?
Thanks!