After stumbling upon this answer I thought I'd do the conversion and compare the two approaches.
I happened to have used the original posters method but didn't like it because it seemed to move the persistence meta-data out of the model and into an external adapter. Some people may like that, but I prefer to have the persistence meta-data in the form of annotations right next to the model (or DTO if you prefer). So I made the conversion and using XStream I was able to remove vast tracts of marshalling code and condense it into a a single 3 line templated method in a base class. All the mapping information is now held in simple to understand annotations, and specialised date handling is managed through an XStream converter. Now for the all important performance figures. In my particular configuration that requires a *lot* of XML parsing and mucking about with various InputStreams, XStream came out on top - which is a relief given the benefits that it brings. The times to completion were: Traditional XML through DocumentFactory and Node analysis=32s XStream=26s Not a vast difference (~20%) but enough to justify XStream as the better way to go. Hope this helps someone. Gary Bruno Borges wrote: > > Try XStream. :-) > > Cheers, > Bruno > -- View this message in context: http://www.nabble.com/Proposal---A-Very-Simple-API-for-Reading-Simple-XML-Data-tp23804602p25344422.html Sent from the Apache XML - Commons - Dev mailing list archive at Nabble.com.
