Storing SAX Locator information in DOM tree

Mike Williams mikew at
Thu Dec 2 08:08:51 GMT 1999

I'm pre-parsing some XML-based web-page templates, and building them into
DOM Documents.  My template-processor takes Document+data as input, and
generates SAX events.

My problem is this: if I detect an error while processing the template
(expected tags are missing, etc.), I have no way of relating this to a
position in the original template-file.  This would obviously be useful for 
my template-authors, so they don't have to re-check entire templates.

I'd really like to store information against each node in the Document,
recording what file it was built from, and where (line/column) the node
started; the SAX Locator information, basically.  Reasonable?  

Is there any way to implement this?

Mike Williams

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list