Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting an inline schema from a dataset
Message
De
11/10/2003 15:28:03
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00837774
Message ID:
00837843
Vues:
29
Thanks, Rick ... I've used StringReader before, so I thought that maybe StringWriter might figure into this somehow, but hadn't actually tried it, so I wasn't sure. Thanks for clarifying ...

~~Bonnie

>This will do it...
>
>// StringWriter receives the output XML stream
>StringWriter loWriter = new StringWriter();
>
>// Note you have to write with Schema in order for XMLAdapter to be able
>// to process the table.
>ds.WriteXml( loWriter,XmlWriteMode.WriteSchema );
>
>
>string lcXml = loWriter.ToString();
>
>
>+++ RIck --
>
>>Steve,
>>
>>You might want to look into the XmlDocument class. I haven't really played with it, but I think it'll do what you're looking for. I was gonna play with it a bit before replying to you, but I thought I'd mention it first, so we can *both* play with it. <g>
>>
>>Also, you might want to look at DataSet.WriteXML() ... I've used it to write files, but you might be able to tweak something to write to a string.
>>
>>~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform