MappingType MappingType MappingType MappingType Enum


Specifies how a DataColumn is mapped.

public enum class MappingType
public enum MappingType
type MappingType = 
Public Enum MappingType


Attribute Attribute Attribute Attribute 2

The column is mapped to an XML attribute.

Element Element Element Element 1

The column is mapped to an XML element.

Hidden Hidden Hidden Hidden 4

The column is mapped to an internal structure.

SimpleContent SimpleContent SimpleContent SimpleContent 3

The column is mapped to an XmlText node.


The following example returns the ColumnMapping property value for each column in a table.

static private void GetColumnMapping(DataTable dataTable)
    foreach (DataColumn dataColumn in dataTable.Columns)
Private Sub GetColumnMapping(ByVal dataTable As DataTable)
    Dim dataColumn As DataColumn
    For Each dataColumn In dataTable.Columns
    Next dataColumn
End Sub


The MappingType enumeration is used when getting or setting the ColumnMapping property of the DataColumn. The property determines how a column's values will be written when the WriteXml method is called on a DataSet to write the data and schema out as an XML document.

Applies to