xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Tyler" <Simon.Ty...@monitrax.com>
Subject Deferred DOM Question
Date Fri, 02 Mar 2001 09:50:51 GMT

Hi,

I am using Xerces 1.2.3 and I have a query about the defered DOM
implementation. When I create a DOMParser and parse my input only the
top level is done. Later the rest is done on demand. This is fine. 

However, at what point has the DOMParser I created for the initial parse
been finished with? I would like to re-use it if possible to parse some
more XML from a different source but I can't find any documentation
anywhere that tells me when the original parser has finished.

For example, is the following safe:

DOMParser parser = new DOMParser();

parser.parse(xmlinputsource1);
Document doc1 = parser.getDocument();	

parser.reset();

parser.parse(xmlinputsource2);
Document doc2 = parser.getDocument();	

// Do stuff with doc1 and doc2

Simon

Mime
View raw message