• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

java heap memory usage

 
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
 
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.
 
Author and all-around good cowpoke
Posts: 13078
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
 
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
Boost this thread!