I should think so.  The DOM parser creates the entire tree this way; I'd
think you could wait for SAX to present the element you're looking for,
then use standard DOM create...() functions to build your tree from
there.  Your parser would need to keep track of its present state (am I
parsing something that needs to go into the DOM, and if so, where in the
tree am I?).

Of course, DOM is not particularly space-efficient, so a native
representation of the data would be better if that's an option.

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Rotsaert
Sent: Thursday, March 08, 2007 10:20 AM
To: [email protected]
Subject: SAX and DOM

Hi all,

Is it possible to parse a XML file using SAX and create a DOM tree of a
part of the file?

Thanks,
Patrick

Reply via email to