xml - The schema contains no root elements error in the XSD file -


i have xsd file , have generate xml extracts based on xsd. source data comes view.

i structured package oledsource(sql server) - > xml destination output. when mapping existing xsd file in xml destination output, throwing error stating "no root element found, xml cannot generated . have root element in xsd file. not sure why xsd file throwing error.

below xsd file data.

`<?xml version="1.0" encoding="utf-8" standalone="no"?> <xsd:schema      xmlns="http://www.demandware.com/xml/impex/pricebook/2006-10-31"      xmlns:xsd="http://www.w3.org/2001/xmlschema"      targetnamespace="http://www.demandware.com/xml/impex/pricebook/2006-10-31"     attributeformdefault="unqualified"      elementformdefault="qualified" >      <xsd:import namespace="http://www.w3.org/xml/1998/namespace" schemalocation="xml.xsd" />      <xsd:element name="pricebooks">         <xsd:complextype>             <xsd:sequence>                 <xsd:element maxoccurs="unbounded" minoccurs="0" name="pricebook" type="complextype.pricebook" />             </xsd:sequence>         </xsd:complextype>     </xsd:element>      <!-- fake top level elements allow jaxb subsection parsing -->     <xsd:element name="header" type="complextype.header" />     <xsd:element name="price-table" type="complextype.pricetable" />      <xsd:complextype name="complextype.pricebook">         <xsd:sequence>             <xsd:element maxoccurs="1" minoccurs="1" name="header" type="complextype.header" />             <xsd:element maxoccurs="1" minoccurs="0" name="price-tables" type="complextype.pricetables" />         </xsd:sequence>     </xsd:complextype>      <xsd:complextype name="complextype.header">         <xsd:sequence>             <xsd:element maxoccurs="1" minoccurs="1" name="currency" type="simpletype.currency" />             <xsd:element maxoccurs="unbounded" minoccurs="0" name="display-name" type="complextype.localizedstring" />             <xsd:element maxoccurs="unbounded" minoccurs="0" name="description" type="complextype.localizedstring" />             <xsd:element maxoccurs="1" minoccurs="0" name="online-flag" type="xsd:boolean" />             <xsd:element maxoccurs="1" minoccurs="0" name="online-from" type="xsd:datetime" />             <xsd:element maxoccurs="1" minoccurs="0" name="online-to" type="xsd:datetime" />             <xsd:element maxoccurs="1" minoccurs="0" name="parent" type="simpletype.generic.nonemptystring.256" />             <xsd:element name="custom-attributes" type="sharedtype.customattributes" minoccurs="0" maxoccurs="1" />         </xsd:sequence>         <xsd:attribute name="pricebook-id" type="simpletype.generic.nonemptystring.256" use="required" />         <xsd:attribute name="mode" type="simpletype.importmode" />     </xsd:complextype>      <xsd:complextype name="complextype.pricetables">         <xsd:sequence>             <xsd:element maxoccurs="unbounded" minoccurs="0" name="price-table" type="complextype.pricetable" />         </xsd:sequence>     </xsd:complextype>      <xsd:complextype name="complextype.pricetable">         <xsd:sequence>             <xsd:element maxoccurs="1" minoccurs="0" name="online-from" type="xsd:datetime" />             <xsd:element maxoccurs="1" minoccurs="0" name="online-to" type="xsd:datetime" />             <xsd:choice maxoccurs="unbounded" minoccurs="0">                 <xsd:element name="amount" type="complextype.amountentry" />                 <xsd:element name="percentage" type="complextype.percentageentry" />             </xsd:choice>             <xsd:element maxoccurs="1" minoccurs="0" name="price-info" type="simpletype.generic.string.256" />         </xsd:sequence>         <xsd:attribute name="product-id" type="simpletype.generic.nonemptystring.100" use="required" />         <xsd:attribute name="mode" type="simpletype.pricetableimportmode" />     </xsd:complextype>      <xsd:complextype name="complextype.amountentry">         <xsd:simplecontent>             <xsd:extension base="xsd:decimal">                 <xsd:attribute name="quantity" type="xsd:decimal" />             </xsd:extension>         </xsd:simplecontent>     </xsd:complextype>      <xsd:complextype name="complextype.percentageentry">         <xsd:simplecontent>             <xsd:extension base="xsd:decimal">                 <xsd:attribute name="quantity" type="xsd:decimal" />             </xsd:extension>         </xsd:simplecontent>     </xsd:complextype>      <xsd:complextype mixed="false" name="complextype.localizedstring">         <xsd:simplecontent>             <xsd:extension base="simpletype.generic.string.4000">                 <xsd:attribute ref="xml:lang" />             </xsd:extension>         </xsd:simplecontent>     </xsd:complextype>      <xsd:simpletype name="simpletype.importmode">         <xsd:restriction base="xsd:string">             <xsd:enumeration value="delete" />         </xsd:restriction>     </xsd:simpletype>      <xsd:simpletype name="simpletype.pricetableimportmode">         <xsd:restriction base="xsd:string">             <xsd:enumeration value="delete" />             <!--  specialized import mode meaning remove price tables given product id -->             <xsd:enumeration value="delete-all" />         </xsd:restriction>     </xsd:simpletype>      <xsd:simpletype name="simpletype.currency">         <xsd:restriction base="xsd:string">             <xsd:pattern value="[a-z]{3}" />         </xsd:restriction>     </xsd:simpletype>      <xsd:simpletype name="simpletype.generic.string">         <xsd:restriction base="xsd:string" />     </xsd:simpletype>      <xsd:simpletype name="simpletype.generic.string.256">         <xsd:restriction base="simpletype.generic.string">             <xsd:minlength value="0"/>             <xsd:maxlength value="256"/>         </xsd:restriction>     </xsd:simpletype>      <xsd:simpletype name="simpletype.generic.string.4000">         <xsd:restriction base="simpletype.generic.string">             <xsd:minlength value="0" />             <xsd:maxlength value="4000" />         </xsd:restriction>     </xsd:simpletype>       <!--  nonempty string no leading or trailing whitespace -->     <xsd:simpletype name="simpletype.generic.nonemptystring.100">         <xsd:restriction base="simpletype.generic.string">             <xsd:minlength value="1" />             <xsd:maxlength value="100" />             <xsd:pattern value="\s|(\s(.*)\s)" />         </xsd:restriction>     </xsd:simpletype>      <xsd:simpletype name="simpletype.generic.nonemptystring.256">         <xsd:restriction base="simpletype.generic.string">             <xsd:minlength value="1" />             <xsd:maxlength value="256" />             <xsd:pattern value="\s|(\s(.*)\s)" />         </xsd:restriction>     </xsd:simpletype>      <!-- shared complex types -->     <xsd:complextype name="sharedtype.customattributes" mixed="false">         <xsd:sequence>             <xsd:element name="custom-attribute" type="sharedtype.customattribute" minoccurs="0" maxoccurs="unbounded" />         </xsd:sequence>     </xsd:complextype>      <xsd:complextype name="sharedtype.customattribute" mixed="true">         <xsd:sequence>             <xsd:element name="value" type="simpletype.generic.string" minoccurs="0" maxoccurs="unbounded" />         </xsd:sequence>         <xsd:attribute name="attribute-id" type="simpletype.generic.nonemptystring.256" use="required" />         <xsd:attribute ref="xml:lang" />     </xsd:complextype>  </xsd:schema>  ` 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -