Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SAX and DOM APIS

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can annyone tell me the advatage of sax and dom apis because some books says that dom is faster whereas I think that sax r faster because they parse the document only once can anyone clarify...please..?
Thanx in advance
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use of DOM:
- when you need to know a lot abt the structure of a doc.
- move parts of the doc around (re-arrange the hierarchy)
- use info of the doc more than once.
Use of SAX:
- need to extract only a few elements from an xml doc.
- not much memory to work with
- one time use
If you are looking for detailed examples, I would
strongly suggest the IBM Tutorial posted earlier
by Bill. Thanks Bill.
Regds.
- satya

[This message has been edited by Madhav Lakkapragada (edited August 02, 2000).]
 
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic