NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataSet.Xml

Gets or sets the XML data for the DataSet.

[Visual Basic]
Public Property Xml As String
[C#]
public string Xml {get; set;}
[C++]
public: __property String* get_Xml();
public: __property void set_Xml(String*);
[JScript]
public function get Xml() : String;
public function set Xml(String);

Property Value

The XML code that defines the DataSet including its relationships, table schemas, and data.

Remarks

The code returned by the Xml property may have both schema and instance data. To return just the XML schema, use the XmlSchema property. To return just the XML data, use the XmlData property.

Example [Visual Basic]

The following example prints the XML data for a DataSet using the XML property.

[Visual Basic]

Private ds As DataSet

Private Sub PrintToFile()
   ds =New DataSet
   ' Not shown: code to fill the DataSet with tables and data.
   
   ' Open a file for XML data.
   Open "\\myFileDirectory\Temp\Nwind.xml" For Output As #1
   Print #1, myDS.Xml
   Close
End Sub

See Also

DataSet Class | DataSet Members | System.Data Namespace