xmlbeans out of memory error.
Posted on 2004-11-03
I need to genrate a large XML file. I am using xmlbeans for genration. It works fine when i have to genrate a small file of upto 10,000 records but for my use I need as many as over 50,000 records for which I am getting this out of memory error.
The way I am doing it is I keep genrating xml file in a while loop as long as I am haivng records in resultSet when there is no more data in result set after the while loop i write it to file using save(outputstream) (XMLTokenSource) .
I am hoping if there is a way where i can keep writing to a file as I am adding new elements to the XML there by it does not have to build the tree in the memory and write all at once at the end.