dcsimg
comparision between sax and dom validating parsers
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jeetendra_kumar
Posted On:   Thursday, April 26, 2001 05:02 AM

Do SAX and DOM validating parsers take the same amount of memory while validating a document?

Re: comparision between sax and dom validating parsers

Posted By:   Frank_Nestel  
Posted On:   Thursday, April 26, 2001 05:32 AM

If you only need to validate a document (and not do anything else with it) SAX does it without actually taking memory for the document: Just implement an empty handler which captures all SAX-events and ignores them. All but the error handling events.


All existing DOM parsers actually seem to be built on top of SAX parsers and a DOM is a very costly (but also valuable at times) data structure in memory. DOM comes in handy if you have to manipulate documents in memory.
About | Sitemap | Contact