I have to ask... What SAX Parser are you using? Does it happen every time? How much memory on your system? In use and free during testing?
Thanks, Dave Lee Peik Feng wrote: > Hi, > > I'm using JDK1.4.2, WinXP > > I have a program that will read XML file and create XML document (I > didn't write to file, i only need the Document). > > The program will be executed quite frequently and after somtimes, I'll > get an IO exception: too many open files. > > did any one know why is the problem occur? how do I resolve this > problem? > > Here is the code snip: > > // create xml doc > Document doc = DocumentHelper.createDocument(); > Element root = doc.addElement("media"); > > Element mainlist = root.addElement("list"); > mainlist.addAttribute("name", "main"); > > ### logic to generate the complete xml ### > > > // read xml file > String xml = "full-path-to-xml-file"; > SAXReader reader = new SAXReader(); > Document doc = reader.read(xml); > > ### parse xml doc ### > > > Regards, > Peik Feng > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > dom4j-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/dom4j-user > -- +------------------------------------------------------------+ | David Lucas mailto:[EMAIL PROTECTED] | | Lucas Software Engineering, Inc. (740) 964-6248 Voice | | Unix,Java,C++,CORBA,XML,EJB (614) 668-4020 Mobile | | Middleware,Frameworks (888) 866-4728 Fax/Msg | +------------------------------------------------------------+ | GPS Location: 40.0150 deg Lat, -82.6378 deg Long | | IMHC: "Jesus Christ is the way, the truth, and the life." | | IMHC: "I know where I am; I know where I'm going." <>< | +------------------------------------------------------------+ Notes: PGP Key Block=http://www.lse.com/~ddlucas/pgpblock.txt IMHO="in my humble opinion" IMHC="in my humble conviction" All trademarks above are those of their respective owners. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user