Posted By:
Roger_Hand
Posted On:
Thursday, July 24, 2003 12:56 PM
Dunno if this is the easiest way, but this should be possible using
JDom, which I highly recommend for doing this sort of thing. (Click on
Documentation and read the Oracle Magazine articles for a good starting overview.)
It's a bit roundabout, but once you've gotten your nodes using XPath.selectNodes() you could have a little routine for each element that makes recursive calls to element.getParent().
I have not tested this and, again, there may be an easier way of doing this. Good luck!