asp.net.ph

DataSet.ReadXml Method

System.Data Namespace   DataSet Class


Reads XML schema and data into the DataSet.

Overload List

1. Reads XML schema and data into the DataSet using the specified Stream.

2. Reads XML schema and data into the DataSet using the specified file.

3. Reads XML schema and data into the DataSet using the specified TextReader.

4. Reads XML schema and data into the DataSet using the specified XmlReader.

5. Reads XML schema and data into the DataSet using the specified Stream and XmlReadMode.

6. Reads XML schema and data into the DataSet using the specified file and XmlReadMode.

7. Reads XML schema and data into the DataSet using the specified TextReader and XmlReadMode.

8. Reads XML schema and data into the DataSet using the specified XmlReader and XmlReadMode.


Example

The following example illustrates using the ReadXml method to load a given XML file into a DataSet.

NOTE: This example uses one of the overloaded versions of ReadXml. For other examples that may be available, see the individual overload topics.

protected void ReadXmlDemo ( ) {
   // initialize dataset object
   DataSet myData = new DataSet ( );

   // read xml file into dataset
   myData.ReadXml ( Server.MapPath ( "/adonet/demos/authors.xml" ) );

   // call method to display dataset contents into html table
   displayData ( myData );
}
  C# VB

See Also

DataSet Members   DataSet.ReadXml Overload List   ReadXmlSchema   WriteXml   WriteXmlSchema Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph