I think I find the problem .There are "EF BB BF" characters before the XML
prolog,it's the BOM of the UTF-8.How can I resolve this problem without
delete the "EF BB BF" characters?
Can the Castor handle this?



Werner Guttmann-5 wrote:
> 
> Hi,
> 
> Looks like you have one or more 'invisible' characters before the XML
> prolog, which as per specification is not allowed. Opening and saving it
> again with your editor seems to be removing these characters. At least
> that's what it appears to be ....
> 
> Regards
> Werner 
> 
>> -----Original Message-----
>> From: rain.xk [mailto:[EMAIL PROTECTED] 
>> Sent: Donnerstag, 30. November 2006 05:50
>> To: [email protected]
>> Subject: [castor-dev] Content is not allowed in prolog
>> 
>> 
>> Hi, 
>> 
>> There is a problem when I unmarshal a xml file.
>> The console print the error message:
>> Content is not allowed in prolog.{file: [not available]; 
>> line: 1; column: 1}
>>      at 
>> org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:732)
>>      at 
>> org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:588)
>>      .....
>> Caused by: org.xml.sax.SAXParseException: Content is not 
>> allowed in prolog.
>>      at
>> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExcep
>> tion(Unknown
>> Source)
>>      at 
>> org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
>>      at 
>> org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>>      at 
>> org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>>      at 
>> org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
>>      at
>> org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher
>> .dispatch(Unknown
>> Source)
>>      at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu
>> ment(Unknown
>> Source)
>>      at 
>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>      at 
>> org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>>      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>      at 
>> org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>>      at 
>> org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:718)
>>      ... 44 more
>> But,after I open the file with EditPlus(just a editer) and 
>> save with no change,I unmarshal the xml file again.
>> There is no problem ,everything is ok!
>> First, I think the problem is something about BOM,but I have 
>> been comparing the two files and there is nothing different! 
>> They all have the FFFE3C00.
>> Someone can tell me why and how to avoid this problem?
>> 
>> Regards
>> Rain.Xu
>> 
>> --
>> View this message in context: 
>> http://www.nabble.com/Content-is-not-allowed-in-prolog-tf27296
>> 88.html#a7613622
>> Sent from the Castor - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>> 
>>     http://xircles.codehaus.org/manage_email
>> 
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Content-is-not-allowed-in-prolog-tf2729688.html#a7671726
Sent from the Castor - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to