[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Does SAX make sense?
> * XML documents are rarely smaller than memory You presumably meant to say that they are rarely larger than memory? > > These two things conspire to make it that, for the lion's > share of documents, by the time the SAX stream is finished, > all the SAX events will be still in memory, though perhaps > unreachable. If they are in memory, why not make them available? > SAX events are not objects. They are method calls containing objects as their parameters. In many cases the underlying objects will be reused by the parser, for example the same AttributeCollection object will be reused for each startElement event, and the byte array that is passed to the characters() method will be reused for each bufferfull of data that is read from disc. It's quite true, of course, that if you have enough memory to hold a DOM representation of your document, then using SAX merely in order to save memory is fairly pointless. But that doesn't seem a very profound observation. Michael Kay
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|