Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting an inline schema from a dataset
Message
 
To
11/10/2003 11:04:00
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00837774
Message ID:
00837841
Views:
34
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
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform