Read Mode Enum
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies how to read XML data and a relational schema into a DataSet.
public enum class XmlReadMode
public enum XmlReadMode
type XmlReadMode =
Public Enum XmlReadMode
The default read mode.
Reads a DiffGram, applying changes from the DiffGram to the DataSet. The semantics are identical to those of a Merge(DataSet) operation. As with the Merge(DataSet) operation, RowState values are preserved. Input to ReadXml(XmlReader) with DiffGrams should only be obtained using the output from WriteXml(Stream) as a DiffGram.
Reads XML fragments, such as those generated by executing FOR XML queries, against an instance of SQL Server. When XmlReadMode is set to
Ignores any inline schema and reads data into the existing DataSet schema. If any data does not match the existing schema, it is discarded (including data from differing namespaces defined for the DataSet). If the data is a DiffGram,
Ignores any inline schema, infers schema from the data and loads the data. If the DataSet already contains a schema, the current schema is extended by adding new tables or adding columns to existing tables. An exception is thrown if the inferred table already exists but with a different namespace, or if any of the inferred columns conflict with existing columns.
Ignores any inline schema, infers a strongly typed schema from the data, and loads the data. If the type cannot be inferred from the data, it is interpreted as string data. If the DataSet already contains a schema, the current schema is extended, either by adding new tables or by adding columns to existing tables. An exception is thrown if the inferred table already exists but with a different namespace, or if any of the inferred columns conflict with existing columns.
Reads any inline schema and loads the data. If the DataSet already contains schema, new tables may be added to the schema, but an exception is thrown if any tables in the inline schema already exist in the DataSet.
Use the members of this enumeration when setting the
ReadMode parameter of the DataSet.ReadXml method.
Auto mode may be slower than setting XmlReadMode to an explicit option.
Auto performs the most appropriate of these actions:
If the data is a DiffGram, sets the XML read mode to
If the dataset already has a schema, or if the document contains an in-line schema, sets the XML read mode to
If the dataset does not already have a schema and the document does not contain an in-line schema, sets the XML read mode to