aspose file tools*
The moose likes Other Open Source Projects and the fly likes XML to Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "XML to Java" Watch "XML to Java" New topic
Author

XML to Java

Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
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
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Is Digester similar to JAXB?


Groovy
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
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

Joined: Feb 27, 2002
Posts: 8919

Does Digester support XML schema?
Mike Wang
Ranch Hand

Joined: May 09, 2003
Posts: 76
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.


SCJP1.4<br />SCWCD 1.4 (Beta)<br />SCMAD 1.0 (Beta)<br />SCDJWS (Beta)<br />SCBCD 1.3 <br />SCJD <br />SCEA (Prepairing)<br />"I am mike, not milk"
Mike Wang
Ranch Hand

Joined: May 09, 2003
Posts: 76
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

Joined: May 09, 2003
Posts: 76
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

Joined: May 09, 2003
Posts: 76
A good introduction to common Digester
http://www.onjava.com/pub/a/onjava/2002/10/23/digester.html
 
wood burning stoves
 
subject: XML to Java