C.11. Element Text

If an element contains text and has no child elements to be inferred as tables (such as elements with attributes or repeated elements), a new column with the name “TableName_Text” will be added to the table that is inferred for the element. The text contained in the element will be added to a row in the table and stored in the new column. The ColumnMapping property of the new column will be set to MappingType.SimpleContent.

For example, consider the following XML:

<DocumentElement>
  <Element1 attr1="value1">Text1</Element1>
</DocumentElement>

The inference process will produce a table named “Element1” with two columns: “attr1” and “Element1_Text.” The ColumnMapping property of the “attr1” column will be set to MappingType.Attribute. ...

Get Essential ADO.NET 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.