Click here to Skip to main content
Click here to Skip to main content

XML Reading Using DOM and SAX

, 10 Aug 2002
Rate this:
Please Sign up or sign in to vote.
Example of reading XML using two interfaces DOM and SAX
There are two simple methods in my application: one is reading xml file by using DOM method and the other is reading the same file using SAX method. I’m not gonna explain the difference between DOM & SAX, only telling this that in DOM , a parser must read the whole file u r reading before u can read anything. In other words the file is loaded into the memory of your application, where DOM makes an object model of it, then u can traverse throw the elements of this object model & receive/update needed information. SAX method, reads file step by step, so it is a resource benefit . Of course there can be said a lot about that but if u r interested I’m sure u’ll find more complex info. I made this example when I was studying XML and its two models/interfaces for making parsers – DOM & SAX and it was interesting for me to use them throw NET. <!-- Download Links -->

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

rosen
Web Developer
Bulgaria Bulgaria
No Biography provided

Comments and Discussions

 
Questionwhere is SAX? PinmembertheGrim11-Oct-06 6:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 11 Aug 2002
Article Copyright 2002 by rosen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid