I'm using xsd.exe in Visual Studio 2005 to create a strongly typed dataset from an XML file to an XSD file.
The problem is that when writing back into XML (DataSet.WriteXml()), the elements are not in the correct order.
What produced
Notice the CustRef element is placed at the bottom?
What's expected:
The problem is that when writing back into XML (DataSet.WriteXml()), the elements are not in the correct order.
What produced
Code:
<CXML>
<CXMLRq error="stop">
<AddRq>
<Invoice>
<Date>2009-08-25T13:11:03+12:00</Date>
<RefNumber>InvNo0001</RefNumber>
<Memo>Memo line 1</Memo>
<CustRef>
<ID>10002111</ID>
<Name>John Doe</Name>
</CustRef>
</Invoice>
</AddRq>
</CXMLRq>
</CXML>
Notice the CustRef element is placed at the bottom?
What's expected:
Code:
<CXML>
<CXMLRq error="stop">
<AddRq>
<Invoice>
<CustRef>
<ID>10002111</ID>
<Name>John Doe</Name>
</CustRef>
<Date>2009-08-25T13:11:03+12:00</Date>
<RefNumber>InvNo0001</RefNumber>
<Memo>Memo line 1</Memo>
</Invoice>
</AddRq>
</CXMLRq>
</CXML>