JAXB XJC [ERROR] Content is not allowed in prolog
D:\project>xjc.exe -p com.package sample_schema.xsd
parsing a schema…
[ERROR] Content is not allowed in prolog.
line 1 of file:/D:/project/sample_schema.xsd
Remove this lines in xsd:
<?xml version="1.0" encoding="utf-16"?> <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
add this lines in xsd:
<?xml version="1.0" encoding="ISO-8859-1" ?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">




Thanks. That worked!
I was using the xsd file generated from:
http://www.xmlforasp.net/CodeBank/System_Xml_Schema/BuildSchema/BuildXMLSchema.aspx
Once I changed as you recommended, the error went away.