Click here to Skip to main content
6,595,444 members and growing! (17,108 online)
Email Password   helpLost your password?
Languages » XML » General     Intermediate

XML Reading Using DOM and SAX

By rosen

Example of reading XML using two interfaces DOM and SAX
C#, XML, Windows, .NET 1.0, Dev
Posted:10 Aug 2002
Views:77,208
Bookmarked:11 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
54 votes for this article.
Popularity: 2.51 Rating: 1.45 out of 5
23 votes, 79.3%
1
1 vote, 3.4%
2

3
1 vote, 3.4%
4
4 votes, 13.8%
5
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


Member

Occupation: Web Developer
Location: Bulgaria Bulgaria

Other popular XML articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 9 of 9 (Total in Forum: 9) (Refresh)FirstPrevNext
GeneralMy vote of 1 Pinmemberxandervdm1:36 14 Sep '09  
General[Message Removed] Pinmemberhankjmatt23:18 13 Oct '08  
GeneralI got what I was looking for PinmemberAshutosh Bhawasinka11:30 6 Dec '06  
Generalwhere is SAX? PinmembertheGrim7:25 11 Oct '06  
GeneralARTICLE SUCKS PinsussAnonymous0:16 15 Dec '04  
GeneralArticle sucks PinsussAnonymous5:52 17 Oct '03  
GeneralRe: Article sucks Pinmemberdog_spawn6:02 17 Oct '03  
GeneralPoor Article PinmemberPaul A. Howes3:35 12 Aug '02  
GeneralRe: Poor Article PinmemberBubba21465:26 12 Aug '02  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 10 Aug 2002
Editor:
Copyright 2002 by rosen
Everything else Copyright © CodeProject, 1999-2009
Web21 | Advertise on the Code Project