Thanks Christian, name() is ok, but text() doesn't work. For example if I do /root/x/text(), it returns an empty list. But if I convert the JDOM document to a DOM document and use jaxen.dom.XPath, it returns the expected result. So it must be a bug in jaxen.jdom.XPath. I looked at the source, but there wasn't anything obvious. regards, Manjuka
--- Christian Nentwich <[EMAIL PROTECTED]> wrote: > > For path = root/x, I get a list with the x > element, > > but for path = root/x/text() and path = > root/x/name() > > I get an empty list. > > Try using /root/x (even though you do pass the > document as the context > node). Also note that /root/x/name() is not a valid > path. If you are > looking for the name of a node, use name(/root/x) > (but you know that > will return 'x' anyway :) > > Christian > > __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest