dataset.writexml using dtd

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • judy

    #1

    dataset.writexml using dtd

    Hi!

    I want to write 3 datasets from different tables into a xml file. i
    thought that would work using a dtd file. But i can't find a solution
    for my problem.

    At the moment i can only write one dataset into an xml file: i do that
    the following way:

    DataSet ds = ThemeManager.ge tThemes(themes) ;
    FileStream myFs = new FileStream("C:/test.xml", FileMode.Create ,
    FileAccess.Writ e);
    ds.WriteXml(myF s);
    myFs.Close();

    This works.
    I hope somebody can help me.

    Maria
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: dataset.writexm l using dtd

    Maria,

    What you want to do is actually load each dataset into an XmlDocument
    instance. Once you have that, you can create a fourth document and then add
    all of the other documents as children of the fourth document (the fourth
    document would have one root node, from which the other three would insert
    their nodes).

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nicholas.paldin o@exisconsultin g.com

    "judy" <merkenger@tm1. at> wrote in message
    news:d7f9352f.0 307302341.6e464 bde@posting.goo gle.com...[color=blue]
    > Hi!
    >
    > I want to write 3 datasets from different tables into a xml file. i
    > thought that would work using a dtd file. But i can't find a solution
    > for my problem.
    >
    > At the moment i can only write one dataset into an xml file: i do that
    > the following way:
    >
    > DataSet ds = ThemeManager.ge tThemes(themes) ;
    > FileStream myFs = new FileStream("C:/test.xml", FileMode.Create ,
    > FileAccess.Writ e);
    > ds.WriteXml(myF s);
    > myFs.Close();
    >
    > This works.
    > I hope somebody can help me.
    >
    > Maria[/color]


    Comment

    Working...