xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] Query: Any way to determine ordering of two nodes?
- From: Gregory Garretson <gregory AT garretson.info>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] Query: Any way to determine ordering of two nodes?
- Date: Mon, 13 Mar 2006 21:05:53 -0500
Hello,
I've been using XOM for a few months now, and I really like it. I find it useful, simple, and elegant. However, occasionally I come across something I can't find an obvious way to do. Here's one:
Given two nodes in the same document, Is there a good way to determine which of the nodes precedes the other in normal document order? Assuming they are non-identical, of course. The API, FAQ, and tutorial haven't given me any clues. I suspect you could do it with XPath, but there's that restriction about query() only returning a nodeset.
I can think of very cumbersome ways of doing it, but I'm looking for something that will be relatively efficient. Maybe I've missed something obvious. Any suggestions would be very welcome.
Thanks,
Gregory Garretson
-
[XOM-interest] Query: Any way to determine ordering of two nodes?,
Gregory Garretson, 03/13/2006
- Re: [XOM-interest] Query: Any way to determine ordering of two nodes?, Wolfgang Hoschek, 03/13/2006
Archive powered by MHonArc 2.6.24.