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

后端 未结 13 2128
抹茶落季
抹茶落季 2020-11-27 15:20

I\'ve been beating my head against this absolutely infuriating bug for the last 48 hours, so I thought I\'d finally throw in the towel and try asking here before I throw my

13条回答
  •  忘掉有多难
    2020-11-27 16:15

    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:
      XSD file header:
    3. if anything comes before the XML document type declaration.i.e: hello

提交回复
热议问题