Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting an inline schema from a dataset
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00837774
Message ID:
00837842
Vues:
19
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.
+++ 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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform