Sign In/My Account | View Cart  
advertisement

Article:
 Using SAX for Proper XML Output
Subject: Scaling...
Date: 2003-03-14 10:26:32
From: Matthew Shomphe

How well does this method of XML generation scale? If not well, are there other methods for dealing with large XML documents?


Also, are there methods to "backtrack" and modify the XML document while building it? For example, say that I have an event-driven model. I get event X, which causes me to add the element "element" to the structure. Then, some point in the future, I get an event Y which indicates I have to go back to that "element" and modify it in some way.


Thanks for another great article!


No Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Scaling...
    2003-03-15 13:19:06 Uche Ogbuji [Reply]

    It actually scales very well, as long as you're using a proper output stream and nor cStringIO or something like that. It emits as it goes and holds very little state.


    As for back-tracking, that sounds very contradictory to your ned for scalablity: backtracking requires maintaining stte, which makes it non-scalable. But to answer your question anyway, backtracking is not very easy using this techique.


    --Uche
    http://uche.ogbuji.net


Sponsored By: