Dataset and XSD

  • Thread starter Thread starter RS
  • Start date Start date
R

RS

I have a dataset that i read schema from the XSD file in to. After, i
populate it with some values from the flat file. Fileds lend in to the right
columns in the table however when i tell Dataset to write XML it come out in
the different order as it is in the schema. Is this somethng that could be
changed? How could i make sure that XML coming out of the dataset is in the
same order as it is in the schema?
 
Although it seems like a real violation of the rules of XML, the dataset
(being a relational creature) does not preserve order. You need to use an
under-documented annotation msdata:Ordinal

<xs:element name="au_id" type="xs:string" msdata:Ordinal="1" />
<xs:element name="au_lname" type="xs:string" msdata:Ordinal="2"/>


Cheers
 
Back
Top