"Content is not allowed in prolog" when parsing perfectly valid XML on GAE

0 views
Skip to first unread message

Avinash Dubey via StackOverflow

unread,
Dec 12, 2016, 4:41:04 AM12/12/16
to google-appengin...@googlegroups.com

bellow are cause above “org.xml.sax.SAXParseException: Content is not allowed in prolog” exception.

  1. First check the file path of schema.xsd and file.xml.
  2. The encoding in your XML and XSD (or DTD) should be same.
    XML file header: <?xml version='1.0' encoding='utf-8'?>
    XSD file header: <?xml version='1.0' encoding='utf-8'?>
  3. if anything comes before the XML document type declaration.i.e: hello<?xml version='1.0' encoding='utf-16'?>


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/3030903/content-is-not-allowed-in-prolog-when-parsing-perfectly-valid-xml-on-gae/41097820#41097820
Reply all
Reply to author
Forward
0 new messages