Show / Hide Table of Contents

Class Convert

Converts a System.Xml.XmlElement to or from another data type.

Inheritance
Object
Convert
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM.Xml
Assembly: IRM.dll
Syntax
public static class Convert
Remarks

Eric Quist

Methods

ToDataSet(XmlElement)

Converts the System.Xml.XmlElement to a System.Data.DataSet.

Declaration
public static DataSet ToDataSet(XmlElement value)
Parameters
System.Xml.XmlElement value

A XmlElement.

Returns
System.Data.DataSet

Returns a System.Data.DataSet.

Exceptions
ConstraintException

System.ArgumentException

ToDataSet(XmlElement, DataSet)

Converts the System.Xml.XmlElement to a System.Data.DataSet.

Declaration
public static DataSet ToDataSet(XmlElement value, DataSet dataSet)
Parameters
System.Xml.XmlElement value

A XmlElement.

System.Data.DataSet dataSet

A typed DataSet.

Returns
System.Data.DataSet

Returns the dataSet.

Remarks

When this method returns the data set will contain rows matching the elements from the value.

Exceptions
ConstraintException

System.ArgumentNullException

System.ArgumentException

ToDataSet(XmlElement, DataSet, Boolean)

Converts the System.Xml.XmlElement to a System.Data.DataSet.

Declaration
public static DataSet ToDataSet(XmlElement value, DataSet dataSet, bool ignoreNamespace)
Parameters
System.Xml.XmlElement value

A XmlElement.

System.Data.DataSet dataSet

A typed DataSet.

Boolean ignoreNamespace

true to convert the value even if the namespace is different; otherwise false.

Returns
System.Data.DataSet

Returns the dataSet.

Remarks

When this method returns the data set will contain rows matching the elements from the value.

Exceptions
ConstraintException

System.ArgumentNullException

System.ArgumentException

ToDataSet<T>(XmlElement)

Converts the System.Xml.XmlElement to a typed System.Data.DataSet.

Declaration
public static T ToDataSet<T>(XmlElement value)
    where T : DataSet, new()
Parameters
System.Xml.XmlElement value

A XmlElement.

Returns
T

Returns a typed System.Data.DataSet.

Type Parameters
T

Exceptions
ConstraintException

ToDataSet<T>(XmlElement, T, Boolean)

Converts the System.Xml.XmlElement to a typed System.Data.DataSet.

Declaration
public static T ToDataSet<T>(XmlElement value, T dataSet, bool ignoreNamespace)
    where T : DataSet
Parameters
System.Xml.XmlElement value

A XmlElement.

T dataSet

A typed DataSet.

Boolean ignoreNamespace

true to convert the value even if the namespace is different; otherwise false.

Returns
T

Returns a typed System.Data.DataSet.

Type Parameters
T

Exceptions
ConstraintException

System.ArgumentNullException

System.ArgumentException

ToDataSet<T>(XmlElement, Boolean)

Converts the System.Xml.XmlElement to a typed System.Data.DataSet.

Declaration
public static T ToDataSet<T>(XmlElement value, bool enforceConstraints)
    where T : DataSet, new()
Parameters
System.Xml.XmlElement value

A XmlElement.

Boolean enforceConstraints

Returns
T

Returns a typed System.Data.DataSet.

Type Parameters
T

Exceptions
ConstraintException

ToDataTable(XmlElement, DataTable)

Converts the System.Xml.XmlElement to a System.Data.DataTable.

Declaration
public static DataTable ToDataTable(XmlElement value, DataTable dataTable)
Parameters
System.Xml.XmlElement value

A XmlElement.

System.Data.DataTable dataTable

A typed DataTable.

Returns
System.Data.DataTable

Returns the dataTable.

Remarks

When this method returns the data set will contain rows matching the elements from the value.

ToDataTable(XmlElement, DataTable, Boolean)

Converts the System.Xml.XmlElement to a System.Data.DataTable.

Declaration
public static DataTable ToDataTable(XmlElement value, DataTable dataTable, bool ignoreNamespace)
Parameters
System.Xml.XmlElement value

A XmlElement.

System.Data.DataTable dataTable

A typed DataTable.

Boolean ignoreNamespace

true to convert the value even if the namespace is different; otherwise false.

Returns
System.Data.DataTable

Returns the dataTable.

Remarks

When this method returns the data set will contain rows matching the elements from the value.

ToDiffGram(DataSet)

Converts the System.Data.DataSet to a DiffGram.

Declaration
public static XmlElement ToDiffGram(DataSet value)
Parameters
System.Data.DataSet value

A DataSet.

Returns
System.Xml.XmlElement

The System.Xml.XmlElement equivalent of the value of value.

ToDiffGram(DataTable)

Converts the System.Data.DataTable to a DiffGram.

Declaration
public static XmlElement ToDiffGram(DataTable value)
Parameters
System.Data.DataTable value

A DataTable.

Returns
System.Xml.XmlElement

The System.Xml.XmlElement equivalent of the value of value.

ToXmlElement(DataSet)

Converts the System.Data.DataSet to a System.Xml.XmlElement.

Declaration
public static XmlElement ToXmlElement(DataSet value)
Parameters
System.Data.DataSet value

A DataSet.

Returns
System.Xml.XmlElement

The System.Xml.XmlElement equivalent of the value of value.

Remarks

Use this method to expose a more generic xml structure than the one of a serialized data set.

ToXmlElement(DataTable)

Converts the System.Data.DataTable to a System.Xml.XmlElement.

Declaration
public static XmlElement ToXmlElement(DataTable value)
Parameters
System.Data.DataTable value

A DataTable.

Returns
System.Xml.XmlElement

The System.Xml.XmlElement equivalent of the value of value.

Remarks

Use this method to expose a more generic xml structure than the one of a serialized data table.

ToXmlElement(DataTable, XmlWriteMode)

Converts the System.Data.DataTable to a DiffGram.

Declaration
public static XmlElement ToXmlElement(DataTable value, XmlWriteMode mode)
Parameters
System.Data.DataTable value

A DataTable.

System.Data.XmlWriteMode mode

One of the System.Data.XmlWriteMode values.

Returns
System.Xml.XmlElement

The System.Xml.XmlElement equivalent of the value of value.

Back to top Generated by DocFX