• 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

JDOM Vs DOM

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

Can any one give me some advice whether to use JDOM or DOM for XML parsing in Java. I understand JDOM is specific for java. Any good suggestions are welcome

Thank you.

Ayub.
 
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
What sort of processing of XML do you have to do? Is this for a "quick and dirty" utility or a commercial product? Small documents, big documents or enormous documents?
Bill
 
Ayub ali khan
Ranch Hand
Posts: 399
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

This is for processing a small document, this will be used in a commercial application. Like reading an xml file and generating a response xml based on the input XML. After doing some google search I understood that JDOM is easy to use. My friend says its not the standard and suggesting me to go with DOM. I am new to XML parsing. Any good points on selecting the parser would be helpful. Mean while I will do some further research on this

I just happened to view your web link mentioned in the signature. You have cool stuff there !! I will go through it too

Thanks and Best Regards
Ayub.
[ December 10, 2006: Message edited by: Ayub ali khan ]
 
Marshal
Posts: 28177
95
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
It really doesn't make much difference which of the two you use. Supposedly JDOM is easier to use than DOM. But with JDOM you have to distribute an extra jar file with the application.
 
William Brogden
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

this will be used in a commercial application.


I always stick with the standard Java library just to avoid confusion associated with extra jar files. It really is not hard to get used to if you keep the Javadocs handy. The presence of XPath in the 1.5 library makes quick and dirty utilities easier. There are plenty of good tutorials based on the standard library.

Bill
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My suggestion would be to use JDOM. It is simple, you can be productive quickly and it's relatively logical.

Over the past several years I've used it for XML files larger than 100 meg and just last week coded a simple app with a file only 20 lines long.

The jar file has never been an issue for me
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic