aspose file tools*
The moose likes XML and Related Technologies and the fly likes JaxB conversion is taking too much time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JaxB conversion is taking too much time" Watch "JaxB conversion is taking too much time" New topic
Author

JaxB conversion is taking too much time

Arun Vasu
Greenhorn

Joined: Oct 05, 2010
Posts: 24

Hi All,

I have an issue with XML conversion to java using JAXB. The scenario is,

I have to parse a huge xml file to java objects. The xml will hold 30000 complex types with each one holds about 20 string elements. While parsing, it is taking 4 minutes to convert it in to java.

Could somebody show me some light to reduce the time taken for this conversion ?

Thanks in advance,
Arun
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 513
    
    6
Can you post some code that shows relevant portions of how you're passing the XML file to JAXB and how you're invoking unmarshal?
Also, how is your system using those java objects after unmarshaling?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12805
    
    5
For maximum speed I would use SAX parsing and a whole lot of custom code. Very tedious.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JaxB conversion is taking too much time