Discussion:
[XOM-interest] Offsets in xml text file
Dick Deneer
2009-12-03 16:14:38 UTC
Permalink
Can I use xom to get the offsets (startTag to endTag) of a node in the
resulset of an xpath expression. I would like to show the result to
the user in the original xml text file.

Thanks
DD
Elliotte Rusty Harold
2009-12-03 16:27:56 UTC
Permalink
On Thu, Dec 3, 2009 at 11:14 AM, Dick Deneer
Post by Dick Deneer
Can I use xom to get the offsets (startTag to endTag) of a node in the
resulset of an xpath expression. I would like to show the result to
the user in the original xml text file.
No. XOM does not report locations in the original file.
--
Elliotte Rusty Harold
elharo at ibiblio.org
Michael Ludwig
2009-12-03 17:26:26 UTC
Permalink
Post by Dick Deneer
Can I use xom to get the offsets (startTag to endTag) of a node
in the resulset of an xpath expression. I would like to show the
result to the user in the original xml text file.
If you have your XML in XOM and want to *show* particular nodes to
the user, then some graphical representation of the XOM object seems
required. And that should be updated from the underlying object,
like in an editor. But I don't know how this is done in practice.

Maybe nu.xom.Node#hashCode() will serve you.
--
Michael Ludwig
Loading...