[jdom-interest] org.jdom.JDOMException

Gerardo Arroyo gerardo at flecharoja.com
Tue Apr 30 16:03:46 PDT 2002


I've a very simple question. I've a XML log file, this log contains all the
activity from a Java application server. There're some cases, by example:
when the server has a fatal error, or the PC is shutdown or anything else...
in such events the final end-tag is absent.

So, every time that I attempt to process the file I get an:

org.jdom.JDOMException: Error on line 558 of document : The element type
"imx-log" must be terminated by the matching end-tag "</imx-log>"

I want to be able to process the log file no matter of this missing end-tag.
Is there any way to do that?? I'm using JDOM Beta 8.

Extract of my source code:

            FileInputStream file = new

            // Request SAX Implementation
            SAXBuilder builder = new

            // Get the Document
            Document doc = builder.build(file);

            // Get the root element
            Element root = doc.getRootElement();

		// bla bla bla....

Thanks in advance,


More information about the jdom-interest mailing list