[jdom-interest] Issue with xml prolog

Michael Kay mike at saxonica.com
Thu Nov 22 08:30:07 PST 2007

An XML declaration is only allowed right at the beginning of the file.

Michael Kay

> -----Original Message-----
> From: jdom-interest-bounces at jdom.org 
> [mailto:jdom-interest-bounces at jdom.org] On Behalf Of Abhishek Parwal
> Sent: 22 November 2007 15:37
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] Issue with xml prolog
> Hi,
> I am getting following error when i try to parse the 
> following xml data <attribute ><value> <?xml version="1.0" 
> encoding="ISO-8859-1"?> <note> HI </note> 
> </value></attribute> There are no  whitespaces before prolog 
> of xml (ie  before <?xml..) and also not before <attribute>. 
> But it still gives me the folllowing error.  
> org.jdom.input.JDOMParseException: Error on line 1: The 
> processing instruction target matching "[xX][mM][lL]" is not allowed
> Most of the places i googled people tell to remove white 
> spaces before prolog to correct it. But here in my xml data 
> there are no white spaces before prolog. 
> Please suggest where i am going wrong.
> Thanks and Regards,
> Abhishek
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@you
> rhost.com

More information about the jdom-interest mailing list