mercredi 25 mars 2015

XML Parsing| JaxB vs Xslt | Java


Working on some analysis for parsing the XML data so that this can be used by the system , I have worked with both JaxB based XML parsing and Xslt and have mixed experience with both.


The system on which I am working provide a way to import the data using CSV format, all I need to pass the CSV files to the platform and it will import the process using spring integration and its build in mechanism to transform CSV file to its own internal format for importing. Currently I have to deal with parsing large XML files ( > 500mb or more sometime) and I have these 2 options


JAxB



  1. Use JaxB with StAX XMLStreamReader to read files in chunk and use platform system API to save data in to the system using the ORM ( like sending data in batch mode )


XSLT



  1. Use XSLT technique to convert XML to CSV format and let the system to handle rest of the process for me


I am fine in using any of the options but not sure what might be the best way to handle large XML file parsing (provided size of the XML will keep growing based on the number of product system have).


Can any one provide there input on choosing the approach.





Aucun commentaire:

Enregistrer un commentaire