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.createSAXParseException(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.scanDocument(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-tf2729688.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