AW: [jdom-interest] XPath.selectNodes(doc) via Jaxen: nodes not in document-order

Per Norrman per.norrman at austers.se
Tue Aug 17 05:50:09 PDT 2004


Kai Wörner wrote:
> Hi,
> 
> Setting apart Jaxen's bugginess - is there a way to determine the ordering
> of a Xpath-expression like //something in Jdom?
> 
> Kai
> 

I cannot see how, directly. But here is a 'crazy' idea:

Create your own Element subclass and your own JDOMFactory.
Assign a sequence number to each new Element. Sort
the result from Jaxen on the sequence number.

/pmn


More information about the jdom-interest mailing list