[jdom-interest] Locate an Element/Attribute/Text withing the XMLOutput
Martin Long
martin at rozel.net
Mon Jul 28 06:45:44 PDT 2003
I have had the need (several times now) to locate the text representing an
XML Element/Attribute/etc within an entire document. Consider for example an
XML editor, containing two panes - the left shows a tree view of the XML,
and the right contains the XMLText itself. The XML text in the right hand
view is generated using an XMLOutputter.
Wouldn't it be useful to call something like
getElementIndex(Document, Element)
This would return a class containing the XML String representing the
Document, and the start and end index positions of the Element passed to it.
Obviously this idea needs a little refinement, but I'm sure it could prove
to be very useful.
Regards
Martin Long
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030728/999ad441/attachment.htm
More information about the jdom-interest
mailing list