• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java heap memory usage

 
vijay kumar
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to create xml file with large size .
but the size is exceeding the heap size.

how to write it directly to the file
 
vijay kumar
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm using DOM and transforming to the .xml file
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a known limitation of DOM.
Use SAX, or increase your heap size.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In many cases the simplest thing to do is just write the XML document text without ever creating a Document or a SAX event. Just make sure the structure of your program reflects the hierarchy you are trying to build in the document.
Bill
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by William Brogden:
In many cases the simplest thing to do is just write the XML document text without ever creating a Document or a SAX event. Just make sure the structure of your program reflects the hierarchy you are trying to build in the document.
Bill


Yes, that would be exact my suggestion too.
Do NOT forget xml is just a text file which follow certain rules. As long as you know what you are doing, then you can do it!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic