• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

DOM vs. SAX  RSS feed

 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
im new to all this xml stuff.....
what is this DOM aproach and the SAX aproach ??
when to use what, is one better in all cases....
thanks

pascal
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of the most discussed topic here at Javaranch XML forum. You might to checkout this old post that has references to many such discussions.
Cheers!
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.
should have come to this idea by myself. sorry.
pascal
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
DOM parses the XML and stores it in the memory
SAX parsing is based on events - You may quit parsing after you got what you want .
DOM is ideal for small xml structure
SAX is good for larger data structures
DOM is good if we want to traverse up and down the tree at will - its in the memory
SAX-use and throw - You may choose to store selectively - if you stored all the xml its no advantage over DOM
Thats all i can think off Off I go to act busy
Senthil

Originally posted by pascal betz:
hi all,
im new to all this xml stuff.....
what is this DOM aproach and the SAX aproach ??
when to use what, is one better in all cases....
thanks

pascal


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!