Parsing xml file using Xstream parser works like charm for small xml files. Some times my web responses (xml format) may be very large as the xml file may be more than 10MB. At this time, the Xml parsing takes too much time to finish. How to increase the performance of Xstream parser for large files.
Asked
Active
Viewed 1,483 times
1 Answers
1
You can use StaxDriver for parsing, if you are using DomDriver. StAX parser does not build entire Object Model at once, it only built relevant information is required. It minimizes the memory requirement and improve the performance. You can use like this:
XStream xstream = new XStream(new StaxDriver());
Hope it may work for you

Samraan
- 204
- 1
- 2
- 14
-
causes an error.. "java.lang.VerifyError: com/thoughtworks/xstream/io/xml/StaxDriver" – Arundas K V Feb 25 '15 at 06:10
-
@AndEngine: Check your library correctly. Can you please provide your approach so that it will be helpful in understanding your problem. You may refer here [link](http://stackoverflow.com/questions/100107/reasons-of-getting-a-java-lang-verifyerror) – Samraan Feb 25 '15 at 10:07
-
A full list of available drivers (with benchmaks) can be found here: http://x-stream.github.io/benchmarks.html - it might be necessary to add the library of the driver of your choice to your classpath to avoid the `VerifyError` @AndEngine mentioned. – Frederic Leitenberger Mar 01 '17 at 18:32