Reads XML schema and data into the DataTable.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
|ReadXml(Stream)||Reads XML schema and data into the DataTable using the specified Stream.|
|ReadXml(TextReader)||Reads XML schema and data into the DataTable using the specified TextReader.|
|ReadXml(String)||Reads XML schema and data into the DataTable from the specified file.|
|ReadXml(XmlReader)||Reads XML Schema and Data into the DataTable using the specified XmlReader.|
The method provides a way to read either data only, or both data and schema into a DataTable from an XML document, whereas the ReadXmlSchema method reads only the schema. To read both data and schema, use one of the ReadXML overloads that include the XmlReadMode parameter, and set its value to ReadSchema.
Note that the same is true for the WriteXml and WriteXmlSchema methods, respectively. To write XML data, or both schema and data from the DataTable, use the WriteXml method. To write just the schema, use the WriteXmlSchema method.