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

XML to Java

 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need java bean representation of an XML file. So I guess Digester is the one to be used. I do see that it is being used by other products like Struts to construct java representation of config files. More importantly does it perform well for say an XML file of size say 5MB? Any indicators of performance of digester?
thanks
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is Digester similar to JAXB?
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:
Is Digester similar to JAXB?


Yes the concept look similar. I have'nt used either of them though . Except that i'm really looking forward to use digester if it satisfies our requirement.Performance is our only concern.
 
Pradeep bhatt
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does Digester support XML schema?
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by karthik Guru:
I need java bean representation of an XML file. So I guess Digester is the one to be used. I do see that it is being used by other products like Struts to construct java representation of config files. More importantly does it perform well for say an XML file of size say 5MB? Any indicators of performance of digester?
thanks


digester is based on SAX2 model. I am sure that it is more faster than JAXB.
 
Mike Wang
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:
Does Digester support XML schema?


Yes. but A bug in Xerces 2.0.2 prevents the support of XML schema. You need Xerces 2.1 or JAXP 1.2.1 to make it working with XML schema.
 
Mike Wang
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:
Is Digester similar to JAXB?


Digester is like SAX2 (it is based on sax2 actually). It is better used to read a xml document.
While JAXB is a JSR which is based on xml schema for the mapping. And you can read or write xml document using JAXB.
I have used both of them. And found that Digester is faster than JAXB RI in reading.
 
Mike Wang
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A good introduction to common Digester
http://www.onjava.com/pub/a/onjava/2002/10/23/digester.html
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic