Home > XML > JAXB XJC [ERROR] Content is not allowed in prolog

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

Categories: XML Tags: ,
  1. Anand
    October 9, 2009 at 1:16 pm | #1

    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.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.