문제

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...

도움이 되었습니까?

해결책

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"?>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top