writing XSD from XML -


i writing xsd xml.i strucked @ point.can please me out. please mderators delete this

<xsd:element name="aaa">      <xsd:complextype>     ,  <xsd:element name="cvccodeswitch " type="xsd:integer" nillable="true"/> 

in above 1 how can make assumptions integer?

the

<xsd:element name="cvccodeswitch " type="xsd:integer" nillable="true"/> 

should fine (only integer allowed); you're confused because

<cvccodeswitch />  

is not nil; nil xml element looks like

<cvccodeswitch xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"    xsi:nil="true"  /> 

(you can omit xmlns:xsi if you've declared @ higher level)

if have no control on xml (i.e. have write xsd according xml have) have declare type union of integer , empty string:

<xsd:element name="cvccodeswitch">   <xsd:simpletype>     <xsd:union>       <xsd:simpletype>         <xsd:restriction base="xsd:integer" />       </xsd:simpletype>       <xsd:simpletype>         <xsd:restriction base="xsd:string">           <xsd:enumeration value=""/>         </xsd:restriction>       </xsd:simpletype>     </xsd:union>   </xsd:simpletype> </xsd:element> 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -