[jdom-interest] XPath on Element, Document, etc?

Bradley S. Huffman hip at a.cs.okstate.edu
Wed Apr 30 20:16:33 PDT 2003


Jason Hunter writes:

> One outstanding TODO item is to decide if we should put any XPath calls
> on Element, Document, and the other org.jdom objects or if it's better
> to leave the functionality isolated in org.jdom.xpath.XPath.
> 
> I'm interested in people's thoughts, esp Laurent and Brad who've done
> some experimentation in this area.

Something like "List evaluateXPath(String xpath)" sounds good if the javadocs
point out the limitations (see Laurent and Elliotte's discussion on the
XOM mailing list about these limitations).

One observation, currently all methods returning a list, return a list
of JDOM objects.  Since XPath evaluations can return non-JDOM objects, this
would make it a odd-ball with the rest of the API. But then again, IMHO this
is another problem that's easily handled with good documentation.

Where you also thinking of a convenience method for transforms off of 
Element and Document?

Brad



More information about the jdom-interest mailing list