P
Praveen
Hello All,
I wanted to query database and make an XML using WriteXML function in the
dataset. When I use WriteXML function the XML structure is according to some
default schema. I wanted the schema to be defined by me (given below).
I tried using ReadSchema function before calling the fill function in the
dataAdapter but that did not help
can someone please advice
Thanks in advance,
Praveen
<?xml version="1.0" standalone="yes"?>
<xs:schema id="ROOT" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="ROOT" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="I">
<xs:complexType>
<xs:sequence>
</xs:sequence>
<xs:attribute name="NTID" type="xs:string" />
<xs:attribute name="U" type="xs:string" />
<xs:attribute name="T" type="xs:string" />
<xs:attribute name="PJNAM" type="xs:string" />
<xs:attribute name="SNDR" type="xs:string" />
<xs:attribute name="SDT" type="xs:string" />
<xs:attribute name="C" type="xs:string" />
<xs:attribute name="P" type="xs:string" />
<xs:attribute name="S" type="xs:string" />
<xs:attribute name="E" type="xs:string" />
<xs:attribute name="SID" type="xs:string" />
<xs:attribute name="ITMID" type="xs:string" />
<xs:attribute name="ITYP" type="xs:string" />
<xs:attribute name="PRTY" type="xs:string" />
<xs:attribute name="EDT" type="xs:string" />
<xs:attribute name="TYP" type="xs:string" />
<xs:attribute name="RUNR" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:key name="ROOTKey1" msdatarimaryKey="true">
<xs:selector xpath=".//I" />
<xs:field xpath="@NTID" />
</xs:key>
</xs:element>
</xs:schema>
I wanted to query database and make an XML using WriteXML function in the
dataset. When I use WriteXML function the XML structure is according to some
default schema. I wanted the schema to be defined by me (given below).
I tried using ReadSchema function before calling the fill function in the
dataAdapter but that did not help
can someone please advice
Thanks in advance,
Praveen
<?xml version="1.0" standalone="yes"?>
<xs:schema id="ROOT" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="ROOT" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="I">
<xs:complexType>
<xs:sequence>
</xs:sequence>
<xs:attribute name="NTID" type="xs:string" />
<xs:attribute name="U" type="xs:string" />
<xs:attribute name="T" type="xs:string" />
<xs:attribute name="PJNAM" type="xs:string" />
<xs:attribute name="SNDR" type="xs:string" />
<xs:attribute name="SDT" type="xs:string" />
<xs:attribute name="C" type="xs:string" />
<xs:attribute name="P" type="xs:string" />
<xs:attribute name="S" type="xs:string" />
<xs:attribute name="E" type="xs:string" />
<xs:attribute name="SID" type="xs:string" />
<xs:attribute name="ITMID" type="xs:string" />
<xs:attribute name="ITYP" type="xs:string" />
<xs:attribute name="PRTY" type="xs:string" />
<xs:attribute name="EDT" type="xs:string" />
<xs:attribute name="TYP" type="xs:string" />
<xs:attribute name="RUNR" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:key name="ROOTKey1" msdatarimaryKey="true">
<xs:selector xpath=".//I" />
<xs:field xpath="@NTID" />
</xs:key>
</xs:element>
</xs:schema>