Gets or sets the XML data for the DataSet.
[Visual Basic] Public Property XmlData As String [C#] public string XmlData {get; set;} [C++] public: __property String* get_XmlData(); public: __property void set_XmlData(String*); [JScript] public function get XmlData() : String; public function set XmlData(String);
The data formatted as XML.
Te XML schema defines the tags for the data found in an XML document. The XmlSchema property returns only the tags, and not the data for the DataSet. To return the data, use the XmlData property. Use the Xml property to return both schema and data together.
The following example prints out the XmlSchema and XmlData for a DataSet.
[Visual Basic]
Private Sub PrintXML() ' Presuming a DataGrid control is displaying tables from a DataSet. Dim myDS As DataSet myDS = DataGrid1.DataSource ' Print XmlSchema and XmlData. Console.WriteLine(myDS.XmlSchema) Console.WriteLine(myDS.XmlData) End Sub
DataSet Class | DataSet Members | System.Data Namespace | XmlSchema