xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Dewitt" <dewit...@us.ibm.com>
Subject DOM node->text location mapping
Date Sat, 24 Feb 2001 01:57:18 GMT
I am implementing an XML viewer that has a DOM view and a source view. I
would like to be able to maintain a DOM node to text location mapping so
that I can implement synchronization of selection and changes between the
two panes. In order to do this, I need a way to obtain the *exact* current
line and column number information from an instance of a DOMParser so that
I can construct a mapping. Is this possible? I know that I can use the
org.xml.sax.Locator to get approximations, but I need exact locations for
the purposes of editing the XML source. I am using Xerces 1.3 and haven't
found any way to obtain accurate line and column number information. Any
help would be much appreciated. Thanks, Scott

Scott DeWitt                IBM WebSphere Transcoding Publisher
(919) 486.1919   t/l 526.1919

View raw message