• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

xml handling

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

Traditionally I have been using JAXP or JDOM for handling xml payloads in java where we use the DOM or SAX api for handling xml.
Alternatively there are java2xml and viceversa api libraries available like JAXB, Castor and XMLBeans.
I was wondering when to go for raw xml handling using libraries like JAXP , JDOM and when to resort to java-xml bridging toolkits like castor.

Do post your thoughts on the same.

Thanks
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as raw nodes <-> fields bridge is considered, the Dom4j is very usable. It implements xpath and to access every node or attribute of the document is easy.


This tool works with raw xml and raw beans and abstract the developer from handling "nodeStarted" and "nodeEnded" etc.
 
Pavel Cherkashin
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course if there is a reason to use more abstract binding, then it depends from special needs. Sometimes it is needed to specify the structure of the xml data. Sometimes it is needed to handle the inheritance of data beans. The large byte arrays and multi part data content - is a special topic. The validation of values is also form time to time being the topic to discuss when selecting the tool.

You're the driver.
 
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic