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.XmlData

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);

Property Value

The data formatted as XML.

Remarks

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.

Example [Visual Basic]

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

See Also

DataSet Class | DataSet Members | System.Data Namespace | XmlSchema