xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Clark <an...@apache.org>
Subject Re: DOM Location
Date Sun, 15 Dec 2002 20:47:21 GMT
Ron Rothblum wrote:
> I am not sure if this is the right place to be asking this question but I
> was wondering if anyone knows of a way to find the location in the XML file
> of a DOM parsed node.

You could extend the DOMParser class in order to
keep track of line/column numbers on the callbacks.
Then, you can add this information to the DOM node
that is created. The DOM Level 3 specification has
added methods for handling associated user data.
But please note that DOM Level 3 is not yet
finalized.

There is a sample, dom/DOMAddLines.java, included
with the Xerces package that shows this functionality.

-- 
Andy Clark * andyc@apache.org


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message