[jdom-interest] jaxen/Jdom ? ancestor-or-self axis

Laurent Bihanic laurent.bihanic at atosorigin.com
Fri Jun 6 00:08:42 PDT 2003



Robert Koberg wrote:
> How do you get a List of ancestor-or-self Elements with XPath?
> I have tried:
> String str = "ancestor-or-self::*[@id='".concat(idref).concat("']");
> JDOMXPath xp = new JDOMXPath(str);
> return (List)xp.selectNodes(doc.getRootElement());
> I realize I recurse using getParent() and build the List, but was hoping to
> use XPath.
> Thanks for any help,
> -Rob
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

                 (o o)
Laurent Bihanic                | Tel: +33 (0)1 (direct)
AtosOrigin Systems Integration |      +33 (0)1
e-Business / SC                | Fax: +33 (0)1
Les Miroirs - Bat. C           |
18, avenue d'Alsace            |
F-92926 La Defense Cedex       | E-mail: laurent.bihanic at atosorigin.com

"Microsoft isn't the answer. Microsoft is the question and the answer
  is no."

The opinions expressed are entirely my own and may not necessarily be
those of my employer.  Also, I am not now nor have I ever been a
lawyer.  My opinions are provided as-is with absolutely no warrantee of
merchantability or fitness for any particular use.  Besides, you can't
prove I typed this.  No body saw me type this.  Who says I typed this?

More information about the jdom-interest mailing list