[jdom-interest] org.jdom.JDOMException: Error on line 2 of document file:///C:/src/MC.xml: Content is not allowed in prolog.

Elliotte Rusty Harold elharo at metalab.unc.edu
Tue Apr 22 06:31:37 PDT 2003


At 7:33 PM -0500 4/16/03, David Parker wrote:



>org.jdom.JDOMException: Error on line 2 of document 
>file:///C:/src/MC.xml: Content is not allowed in prolog.
>
>readUtf8Input()
>JDOMException: C:\src\MC.xml is not well-formed.
>
>Error on line 2 of document file:///C:/src/MC.xml: Content is not 
>allowed in prolog.
>org.jdom.JDOMException: Error on line 2 of document 
>file:///C:/src/MC.xml: Content is not allowed in prolog.

It appears that your document is malformed. I don't think this has 
anything to do with JDOM. most likely, the document is not actually 
in the UTF-8 encoding and/or has a few inobvious bytes preceding the 
XML declaration.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list