Dataset WriteXml method

R

RS

I have a dataset that was created from a XSD schema. I populate it with data
and use WriteXml method to create XML document. Problem is XML tags come out
in the order that is different from the order of tags in the XSD. My client
requires that XML validates against XSD, and the use XMLSPY to validate it.
I ran the same test and XMLSPY complains that tags in the wrong order. Is
there a way I can force order of tags with WriteXml method of Dataset? If
not what ate the other alternatives?

Thank you all very much
 
F

Frans Bouma [C# MVP]

RS said:
I have a dataset that was created from a XSD schema. I populate it with data
and use WriteXml method to create XML document. Problem is XML tags come out
in the order that is different from the order of tags in the XSD. My client
requires that XML validates against XSD, and the use XMLSPY to validate it.
I ran the same test and XMLSPY complains that tags in the wrong order. Is
there a way I can force order of tags with WriteXml method of Dataset? If
not what ate the other alternatives?

1) what has this to do with C#?
2) the order of the tags can't be controlled from the Dataset's WriteXml
method. If you want an order, you have to transform the XML with an XSLT to
another XML document and sort the data prior to sending the xml to the client.

FB
 

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