SAX Error – Content is not allowed in prolog

Problem Working XML via SAX parser, but when it parse some XML file, it prompts following error message : 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) //… Solution This error message is always caused by the invalid XML content in the beginning element. For example, extra … Continue reading SAX Error – Content is not allowed in prolog