Gets the XML document for the DataSet.
[Visual Basic] Public ReadOnly Property XmlDocument As XmlDocument [C#] public XmlDocument XmlDocument {get;} [C++] public: __property XmlDocument* get_XmlDocument(); [JScript] public function get XmlDocument() : XmlDocument;
An XmlDocument.
The XmlDocument provides an interface to save and load the information contained in a DataSet as an XML document. Through the property, you can access other methods of the XmlDocument.
The following example returns the XML document for a DataSet associated with a System.WinForms.DataGrid control.
[Visual Basic]
Private Sub GetXMLDocument() Dim ds As DataSet ' Presuming the DataGrid is bound to a DataSet. ds = DataGrid1.DataSource Dim myDoc As xml.XmlDocument myDoc = ds.XmlDocument Console.WriteLine(mydoc.Xml) End Sub
DataSet Class | DataSet Members | System.Data Namespace | XmlDocument