System.Data Namespace DataSet Class
Writes the DataSet structure as an XML schema to a file.
[ VB ]
Overloads Public Sub WriteXmlSchema ( _
ByVal fileName As String _
)
[ C# ]
public void WriteXmlSchema (
String fileName
);
[ C++ ]
public: void WriteXmlSchema (
String* fileName
);
[ JScript ]
public function WriteXmlSchema (
fileName : String
);
- fileName
- The file name ( including the path ) to write to.
Use the WriteXmlSchema method to write the schema for a DataSet to an XML document. The schema includes table, relation, and constraint definitions. To write a schema to an XML document, use the WriteXmlSchema method.
The XML schema is written using the XSD standard.To write the data to an XML document, use the WriteXml method.
private void WriteSchemaToFile ( DataSet thisDataSet ) {
// set the file path and name. Modify this for your purposes.
string filename = "mySchema.xml";
// write the schema to the file.
thisDataSet.WriteXmlSchema ( filename );
}
Private Sub WriteSchemaToFile ( thisDataSet As DataSet )
' set the file path and name. Modify this for your purposes.
Dim filename As String = "mySchema.xml"
' write the schema to the file.
thisDataSet.WriteXmlSchema ( filename )
End Sub |
|
C# |
VB |
DataSet Members DataSet.WriteXmlSchema Overload List WriteXml ReadXml ReadXmlSchema