<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
<TITLE>problem while creating document object</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Hi,</FONT>
<BR><FONT SIZE=2> I am new to this list and running into some problems.</FONT>
<BR><FONT SIZE=2> When I create Document object by parsing an XML file which is quite large, around 13MB then it runs out of memory. I will be dealing with large files and so using SAXBuilder to build the document object. I have tried with a file around 1MB which works fine.</FONT></P>
<P>
<BR> <FONT SIZE=2>I also tried to bump up java VM's heap size by, -Xmx550m and was of no help. My computer has 256MB memory so there is no memory limitations from the system. </FONT></P>
<P><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> I am using following version of software:</FONT>
<BR><FONT SIZE=2> JDOM Beta 6</FONT>
<BR><FONT SIZE=2> Apache Xerces parser (fairly latest)</FONT>
<BR><FONT SIZE=2> JDK 1.2.2</FONT>
</P>
<P> <FONT SIZE=2>I would appreciate feedback for this issue. Any tips to optimize it.</FONT>
</P>
<P> <FONT SIZE=2>String xmlFileName = "c://temp//search4905.xml";</FONT>
</P>
<P><FONT SIZE=2> java.io.File xmlFile = new java.io.File(xmlFileName);</FONT>
</P>
<P><FONT SIZE=2> java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.FileReader(xmlFile));</FONT>
</P>
<P><FONT SIZE=2> SAXBuilder builder = new SAXBuilder();</FONT>
<BR><FONT SIZE=2> Document document = builder.build(reader);</FONT>
</P>
<BR>
<P> <FONT SIZE=2>Thanks,</FONT>
<BR><FONT SIZE=2> Amit</FONT>
</P>
</BODY>
</HTML>