MDoraisamy at SELECTICA.com
Tue Jan 22 04:54:54 PST 2002
i overide getDocument() and setDocument(doc) methods in the element so that
the element behaves like
a root node. So you can use xpath relatively from the element directly using
i dont know if this affects anything else. but works fine for me
From: adam flinton [mailto:aflinton at armature.com]
Sent: Tuesday, January 22, 2002 5:50 PM
To: JDOM Mailing List (E-mail)
Subject: [jdom-interest] XPATH
I have been looking to use XPath within JDOM to stop code bloat (i.e.
instead of calling getchild repeatedly). I have noted the werken, Jaxen &
A) werken seems to be deprecated in favour of the other 2.
B) I note from the JDOM home page that 1.1 is oging to be doing XPath.
What do people here recomend (a) between the 2 existing non-deprecated code
bases & (b) relative to "native JDOM" stuff if one was looking to put some
XPATH stuff into a piece of code which at the moment uses JDOM exclusively
for XML manipulation/interaction.
Wait? Go with Jaxen?
It isn't a killer but it's tedious to know exactly where in the tree I want
to be & thus to have to call getRoot followed by many getChild statements
(or one long one).
Mobile: 0780 3180830
EMail: aflinton at armature.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest