O'Reilly logo

Essential ADO.NET by Bob Beauchemin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required