Dataset and XSD

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?
 
M

Mark Bosley

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
 

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