Dataset WriteXml method

Discussion in 'Microsoft C# .NET' started by RS, May 12, 2004.

  1. RS

    RS Guest

    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
     
    RS, May 12, 2004
    #1
    1. Advertisements

  2. RS wrote:

    > 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

    --
    Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
    My .NET Blog: http://weblogs.asp.net/fbouma
    Microsoft C# MVP
     
    Frans Bouma [C# MVP], May 13, 2004
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. judy

    dataset.writexml using dtd

    judy, Jul 31, 2003, in forum: Microsoft C# .NET
    Replies:
    1
    Views:
    501
    Nicholas Paldino [.NET/C# MVP]
    Jul 31, 2003
  2. Paul

    DataGrid.GetChanges and DataSet.WriteXml

    Paul, Feb 23, 2004, in forum: Microsoft C# .NET
    Replies:
    1
    Views:
    346
    Mohamoss
    Feb 25, 2004
  3. Guest

    DataSet.WriteXml problem

    Guest, Nov 6, 2004, in forum: Microsoft C# .NET
    Replies:
    0
    Views:
    258
    Guest
    Nov 6, 2004
  4. Serdar C

    Filling a Dataset and Dataset.WriteXML method..

    Serdar C, Dec 30, 2004, in forum: Microsoft C# .NET
    Replies:
    3
    Views:
    680
    Sahil Malik
    Dec 31, 2004
  5. Phil Townsend

    DataSet.WriteXml method

    Phil Townsend, Mar 12, 2007, in forum: Microsoft C# .NET
    Replies:
    1
    Views:
    157
Loading...

Share This Page