DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6297>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6297 OutOfMemory error when parsing a non WF document with ByteArrayStream Summary: OutOfMemory error when parsing a non WF document with ByteArrayStream Product: Xerces2-J Version: 2.0.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: SAX AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I'm getting an OutOfMemoryError when parsing an XML document that has more than one root element when parsing is done using a ByteArrayStream. Here is my code: // Text to parse String text = "<Eddie/>\n<Eddie/>"; String fileName = "c:\temp\test.xml"; // Get an XMLReader instance reader = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser"); // Register the Error handler reader.setErrorHandler(errorHandler); // DTD Validation reader.setFeature("http://xml.org/sax/features/validation", true); reader.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true); // Create InputSource InputSource inputSource = new InputSource(new ByteArrayInputStream(text.getBytes())); inputSource.setSystemId(fileName); reader.parse(inputSource); This will just keep going until I get an OutOfMemoryError. Is this a bug or am I doing something wrong? Cheers, /Eddie --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
