Question

I am getting "Error in Prolog" when parsing followinf xsd by xjc

<?xml version="1.0" encoding="utf-16"?>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="info">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="a" type="xsd:string" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

I have checked the validity of the xsd and not getting any error. no character before start also...

Était-ce utile?

La solution

The problem seems to be with encoding="utf-16". Your file doesn't correspond it.

Set the encoding to something else (e.g. utf-8):

 <?xml version="1.0" encoding="utf-8"?>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top