Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Output large xml from resultset

Tags:

java

xml

jdbc

We have an application in which an XML string is created from a stored proc resultset and transformed using XSLT to return to the calling servlet. This work fine with smaller dataset but causing out of memory error with large amount of data. What will be the ideal solution in this case ?

like image 313
joesam232 Avatar asked Jul 25 '26 05:07

joesam232


1 Answers

XSLT transformations, in general, require the entire dataset to be loaded into memory, so the easiest thing is to get more memory.

If you can rewrite your XSLT, there is Streaming Transformations for XML which allow for incremental processing of data.

like image 82
Edward Z. Yang Avatar answered Jul 27 '26 01:07

Edward Z. Yang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!