DataSet XML Methods
The ADO.NET DataSet
stores information internally in a proprietary binary format
that’s optimized for XML representation. This means
that data can be retrieved in XML format seamlessly, without any data
loss or conversion errors. Table 17-1 lists the
DataSet
methods that work with XML.
Method |
Description |
GetXml( ) |
Retrieves the XML representation of the data in the
|
GetXmlSchema( ) |
Retrieves the XSD schema for the |
ReadXml( ) |
Reads XML data from a file or a |
ReadXmlSchema( ) |
Reads an XML schema from a file or a |
WriteXml( ) |
Writes the contents of the |
WriteXmlSchema( ) |
Writes just the XSD schema describing the contents of the
|
InferXmlSchema( ) |
Infers the XML schema and applies it to the
|
Tip
If you need to manipulate or serialize the XML, the best choice is
the direct WriteXml( )
method. Using ...
Get ADO.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.