Article ID: 325696 - View products that this article applies to.
This article was previously published under Q325696
This article has been archived. It is offered "as is" and will no longer be updated.
Valid XML documents that contain multidimensional data cannot be displayed in the Data view of the Microsoft Visual Studio .NET XML Designer.
Note An example of multidimensional data is a single table that participates in more than one parent-child relationship.
When you try to switch to Data view, you receive the following error message on the Data tab of the XML Designer:
Although this XML document is well formed, it contains structure that Data view cannot display.
The same table (Table name) cannot be the child table in two nested relations.
When the Visual Studio .NET XML Designer tries to generate the Data view of an XML document, the XML Designer applies the Microsoft ADO.NET schema inference rules to determine the schema information for the source XML. The ADO.NET schema inference rules in the original release version of the Microsoft .NET Framework do not permit a single table to be a child table in more than one DataRelation object.
According to ADO.NET schema inference rules, elements that have child elements are inferred as tables. In the example in the "Steps to reproduce the behavior" section, the Order element, the Item element, and the Inventory element all have child elements. Therefore, all these elements are inferred as individual DataTable objects.
If elements are inferred as tables, and these tables are nested in other elements that are also inferred as tables, a nested DataRelation is created between the two tables. Therefore, the Item DataTable is also inferred as participating in two parent-child relationships, the Order-Item relationship and the Inventory-Item relationship.
This behavior causes the XML data to be not valid according to the ADO.NET schema inference rules. Therefore, the XML Designer cannot display the data.
Steps to reproduce the behavior
For more information about ADO.NET schema inference rules, visit the following Microsoft Developer Network (MSDN) Web site:
Article ID: 325696 - Last Review: February 27, 2014 - Revision: 4.7