xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Le Hors <leh...@us.ibm.com>
Subject Re: Inserting Data Using SAX
Date Fri, 02 Feb 2001 01:54:34 GMT
If you need to walk through the document to figure out where to make
your insertions then you probably want to use some data structure such
as DOM or JDOM and pay the price for it.
But if you already know where your insertions have to occur in the tree
I strongly suggest you stick with SAX. SAX is much lighter and will lead
to much better performance. 
All you have to do is use the SAX based serializer provided with xerces
and set yourself as a filter between the parser and the serializer. Then
inserting elements is just a matter of sending a few additional SAX
events at the right time, while simply forwarding all the other events.
No structure needs to be created for that!
-- 
Arnaud  Le Hors - IBM Cupertino, XML Strategy Group

Mime
View raw message