• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

DOM4j , JDOM, DOM and Sax Performance

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have read about all the 4 technologies , but still have confusions over which one gives a better performance.

Can anybody help me in understanding which of these is preferred for performance.

Thanks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since all parsers that I am familiar with actually use a SAX parser as a starting point, about the only thing we can say is that SAX is always fastest since the others build on top of SAX.

That is such a superficial answer that it really feels sort of silly to write it down.

In reality, a skilled programmer would select an approach by considering the entire problem since parsing is only part of using XML.

There have been oh-so-many discussions of this type in this forum, browse around in the old threads.

Bill
 
Sheriff
Posts: 26777
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A skilled programmer would also not evaluate products based on a vague term like "performance". Instead he or she would consider memory usage, speed of processing, and probably other "performance" factors.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These are Application Programming Interfaces (API), they are not "parsers." They help developers develop applications that interact with a parser. To understand them clearly is to recognize that the "parsing" and the "processing" that you code is not the same. That said, the performance or speed of any application written with any of these API will depend mostly on how well the application was written. If it is written in a poor way with memory hogging data structures and such, it might be much slower than a different application written with the same API but with a more efficient design.

Aside, if you can write an application using the Simple API for XML (SAX), this will most likely be the fastest. But, depending upon the actual requirements it may take longer to write or may exceed the programmer's skill level, i.e. writing SAX-based code takes advanced knowledge of XML and Java.
reply
    Bookmark Topic Watch Topic
  • New Topic