[jdom-interest] Newbie question

Jason Hunter jhunter at servlets.com
Fri Jan 18 18:31:39 PST 2002

You want http://jaxen.org.  It's a Java XPath engine that works with


Soumanjoy Das wrote:
> Hello All, and Happy New Year.
> I've been programming in Java long enough not to be a newcomer, and I have
> fairly good experience in Microsoft XML-DOM. But I'm still inexperienced in
> Java JDOM, and have only programmed in it using the jdom.jar that we had
> downloaded sometime ago.
> What I want to do is: to be able to use an XSL query in a JDOM root or node
> object to return a single node or collection of nodes. In MS XML, one would
> do it this way:
> 1) E.g. if we were to select the first node with name "block" having
> attribute "id" with a value "123"
> objNode = objRoot.selectSingleNode("//block[id='123']")
> 2) E.g. if we were to select all the nodes with name "block" having
> attribute "id" with a value "123"
> objNode = objRoot.selectNodes("//block[id='123']")
> Would anyone please let me know how to achieve this in JDOM, and what jars
> are required and from where? (I had looked it up over the net and came over
> some documentation regarding this, which provided jars named jaxen-jdom and
> sax-jdom etc., but they were either incomplete or inadequate). I'd be
> grateful for your help.
> Thank you
> Soumanjoy
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

More information about the jdom-interest mailing list