Problem with writexml and typed dataset

G

Guest

Hello,
I genere a file xml since a typed dataset, my problem when the file is
generated, it is created not the elements in the good order.

This is a part of the XSD :
<xs:element name="AA" minOccurs="0" maxOccurs="unbounded">
<xs:complexType mixed="false" final>
<xs:sequence>
<xs:element name="aa" type="xs:string" minOccurs="0" />
<xs:element name="bb" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="cc" nillable="true" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent msdata:ColumnName="cc_Text" msdata:Ordinal="0">
<xs:extension base="xs:string">
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="dd" type="xs:string" minOccurs="0" />
<xs:element name="ee" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>

and the result with dataset.writexml:

<AA>
<aa>test</aa>
<dd>test</dd>
<ee>test</ee>
<bb>
<cc>test</cc>
<cc>test</cc>
<cc>test</cc>
<cc>test</cc>
</bb>
</AA>

I will want a result :

<AA>
<aa>test</aa>
<bb>
<cc>test</cc>
<cc>test</cc>
<cc>test</cc>
<cc>test</cc>
</bb>
<dd>test</dd>
<ee>test</ee>
</AA>

Can you help me on this problem ?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top