A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
XML and Related Technologies
is Document object closes the open file
Joined: Mar 05, 2009
Jan 12, 2010 02:20:39
SAXBuilder xmlFilebuilder = new SAXBuilder();
Document xmlDocument = xmlFilebuilder.build(filePath);
to parse the XML file. But my application requires many hits to XML file.
the app I'm developing is getting one problem as "Too Many open files".
I'm using JDK 6.
I'm not closing the file explicitly as I don't have instance of file. I'm using SAXBuilder.
is Document object closes the object explicitly or not...
Author and all-around good cowpoke
Joined: Mar 22, 2000
Jan 12, 2010 08:15:48
Well, Im not familiar with JDOM but generally we expect XML parsers to close the input stream no matter where it comes from.
You could always build a
and use the build( inputstream ) then close the stream explicitly.
I agree. Here's the link:
subject: is Document object closes the open file
Parser Pooling with JDOM
How do I close an opened XML-file I just read?
Reading a xml file
need to update entry in XML file.
JDOM parsing and memory
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015