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

XML Reading Using DOM and SAX

By , 10 Aug 2002
 
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.

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
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 1protectorBarry Lapthorn21 Feb '10 - 21:37 
No article.
GeneralMy vote of 1memberxandervdm14 Sep '09 - 0:36 
no article, only source code
General[Message Removed]memberhankjmatt13 Oct '08 - 22:18 
Spam message removed
GeneralI got what I was looking formemberAshutosh Bhawasinka6 Dec '06 - 10:30 
though your article is very short...I got what I wanted....
moreover I can't read big articles.....
 
thanks for keeping it short...
 

 
Ashutosh
Questionwhere is SAX?membertheGrim11 Oct '06 - 6:25 
Why SAX was included to title?
There are no SAX API used in this poor example.
GeneralARTICLE SUCKSsussAnonymous14 Dec '04 - 23:16 
YOUR ARTICLE SUPER SUCKS
GeneralArticle suckssussAnonymous17 Oct '03 - 4:52 
You suck! I agree with everyone else
GeneralRe: Article sucksmemberdog_spawn17 Oct '03 - 5:02 
You should say it in the open rather than anonymously. I will give you an example:
 
This article is not very good.
GeneralPoor ArticlememberPaul A. Howes12 Aug '02 - 2:35 
Rosen,
 
No offense, but you really need to make the article more complete. First off, reading abbreviations, such as "u r" instead of "you are" is painful. Leave those in the chat rooms where they belong. Second, talk a little more about your experiences: What problems did you run in to while developing this code? Why were you working on this at all? What are some of the differences between processing a file with SAX versus the DOM?
 
If you can make these changes, then I will be more than happy to vote for your article.
 
--
Paul
 
"I drank... WHAT?"
GeneralRe: Poor ArticlememberBubba214612 Aug '02 - 4:26 
I totally agree. It's not enough to post code and think you're done. The point is to create an *article*, which should never be a single paragraph. I was really disappointed after I clicked the link to this page.

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 11 Aug 2002
Article Copyright 2002 by rosen
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid