See the docs ("Retrieving Multiple Results"):
JXPath can retrieve multiple objects from a graph. Note that the method
called in this case is not getValue(), but iterate().
In your example, this should work:
Iterator it = jx.iterate("ancestor::*");
Peter> -----Ursprungliche Nachricht----- > Von: Psi Aushilfe3 [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 31. Juli 2003 09:43 > An: Jakarta Commons Users List > Betreff: AW: JXPath: "parent-of-self" (descendent-of-self) > > > > use "ancestor::*" to access all ancestor nodes up the the root node > > (or replace * with something more restrictive). Peter > > JXPathContext jx = JXPathContext.newContext(root); > Object o = (Object)jx.getValue("ancestor::*"); > > o is null ... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
