Creating xml file from an xsd usind Dataset

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Below is my xsd file . I have a defined a custome type :

<div style="color:black; background-color:white
<pre><span style="color:blue <?<span style="color:#a31515 xml <span style="color:red version<span style="color:blue =<span style="color:black "<span style="color:blue 1.0<span style="color:black " <span style="color:red encoding<span style="color:blue =<span style="color:black "<span style="color:blue UTF-8<span style="color:black "<span style="color:blue ?>

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 schema <span style="color:red xmlns:xs<span style="color:blue =<span style="color:black "<span style="color:blue http://www.w3.org/2001/XMLSchema<span style="color:black " <span style="color:red elementFormDefault<span style="color:blue =<span style="color:black "<span style="color:blue qualified<span style="color:black " <span style="color:red attributeFormDefault<span style="color:blue =<span style="color:black "<span style="color:blue unqualified<span style="color:black "<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue RESULT<span style="color:black "<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 complexType<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 sequence<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue REQUEST<span style="color:black "<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 complexType<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 sequence<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue APPLICATION_ID<span style="color:black " <span style="color:red type<span style="color:blue =<span style="color:black "<span style="color:blue xs:string<span style="color:black " <span style="color:red minOccurs<span style="color:blue =<span style="color:black "<span style="color:blue 1<span style="color:black "<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 sequence<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 complexType<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue TYPE<span style="color:black " <span style="color:red minOccurs<span style="color:blue =<span style="color:black "<span style="color:blue 1<span style="color:black "<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 complexType<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 sequence<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue ID<span style="color:black " <span style="color:red type<span style="color:blue =<span style="color:black "<span style="color:blue stringParameter_type<span style="color:black " <span style="color:red minOccurs<span style="color:blue =<span style="color:black "<span style="color:blue 1<span style="color:black "<span style="color:blue ><span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 sequence<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 complexType<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 sequence<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 complexType<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 element<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 complexType <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue stringParameter_type<span style="color:black "<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 simpleContent<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 extension <span style="color:red base<span style="color:blue =<span style="color:black "<span style="color:blue xs:string<span style="color:black "<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 attribute <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue COMPARATOR<span style="color:black " <span style="color:red type<span style="color:blue =<span style="color:black "<span style="color:blue stringComparator_type<span style="color:black " <span style="color:red use<span style="color:blue =<span style="color:black "<span style="color:blue optional<span style="color:black " <span style="color:red default<span style="color:blue =<span style="color:black "<span style="color:blue MATCHES<span style="color:black "<span style="color:blue />

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 extension<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 simpleContent<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 complexType<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 simpleType <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue stringComparator_type<span style="color:black "<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 restriction <span style="color:red base<span style="color:blue =<span style="color:black "<span style="color:blue xs:string<span style="color:black "<span style="color:blue >

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 enumeration <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue MATCHES<span style="color:black "<span style="color:blue />

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 enumeration <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue SUBSTRING<span style="color:black "<span style="color:blue />

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 enumeration <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue =<span style="color:black "<span style="color:blue />

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 enumeration <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue &lt;<span style="color:black "<span style="color:blue />

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 enumeration <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue &gt;<span style="color:black "<span style="color:blue />

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 enumeration <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue &lt;=<span style="color:black "<span style="color:blue />

<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 enumeration <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue &gt;=<span style="color:black "<span style="color:blue />

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 restriction<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 simpleType<span style="color:blue >

<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 schema<span style="color:blue >



[/code]

<div style="color:black; background-color:white
<pre>I want to create an xml file using Dataset . [/code]
<pre>If i remove the type stringComparator_type and change it to xs:string my xsd gets loaded into dataset properly . [/code]
<pre>How will i load the above xsd in my data set so that i can create the below xml using datset /datatable/row and coloum[/code]

<br/>
<pre lang="x-xml <REQUEST>
<APPLICATION_ID>NEW</APPLICATION_ID>
</REQUEST>
<TYPE>
<ID COMPARATOR="MATCHES 234</ID>
</TYPE>
</RESULT>
[/code]

View the full article
 
Back
Top