Thanks, Rick - this is exactly what I was looking for. I was just sitting down to check in here, and had mentioned to Kevin and Mike Levy that I'd posted this query, and Mike just showed me the help file entry for this WriteXml() overload! <s>
Actually, there is also an overload that allows writing directly to a file:
public void WriteXml(string fileName, XmlWriteMode mode);
Which is what I was trying to do.
>You can use WriteXml for this and use the WriteSchema option... The following would work:
>
>// 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 ---
>
>
>>DataSet.GetXML() does a fine job of extracting the contents of a DataSet as an XML stream, but I'd like that extracted XML to include an inline schema. There doesn't seem to be an overload for GetXML() that allows you to do this, and it would seem that this should be do-able.
>>
>>FWIW, I'm looking for something that is the equivalent of the cSchemaName argument of "1" to VFP's CursorToXML() function.
>>
>>Thanks.
>>-Steve->>
Steve Sawyer
Geeks and Gurus, Inc.