• 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

dom Versus sax

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can somebody give some suggestion about when we should dom and when we should use sax in best practic?
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess it's about the nature of the data you're expressing in xml. if you've got document centered xml data - DOM means document object model - such as atricles and books you would generally refer to DOM. if your data can be easily presented as a tree, you'd also pick DOM, because it makes tree traversal easier.
If your data is small and structured and can be easily transformed into java objects, you'd pick SAX.
remember DOM will build up a tree representation of your xml and keep it in memory, beware of huge documents and memory exhaustion.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Please read the Chapter 4 of Blue prints - XML Processing.

You can find very good explanation.

-- Srinivas
SCJP, SCJD, SCEA-1, SCBCD, SCDJWS, Weblogic 7.0
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Designing Web Services with the J2EETM 1.4 Platform: 4 XML Processing
Blueprints PDF version

Also see the last post of need help with document based web services for a quick summary.
 
Yi Si
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks every body.

I will read blueprint chapter4 ,I think it should be very helpful.
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic