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);
The XML code that defines the DataSet including its relationships, table schemas, and data.
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.
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