BUG: Element may cause Data View to generate an error message (316687)



The information in this article applies to:

  • Microsoft Visual Basic .NET (2002)
  • Microsoft Visual Studio .NET (2002), Professional Edition

This article was previously published under Q316687

SYMPTOMS

When you view an XML document with Data View in the Microsoft Visual Studio .NET integrated development environment (IDE), you may receive the following error message:
Although this XML document is well formed, it contains structure that Data View cannot display.
The grid cannot show the data correctly because of the unsupported character "." in element name(s).

CAUSE

The XML document has an element name that contains a period (.), and the period (.) is an unsupported character.

RESOLUTION

To resolve this problem, rename the element so that the name does not contain a period.

STATUS

Microsoft has confirmed that this is a problem in Microsoft Visual Basic .Net (2002).

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open Visual Studio .NET.
  2. In Visual Basic .NET, create a new Windows Application project.
  3. Right-click the project name, point to Add, click Add New Item, and then double-click XML File under Templates.
  4. Paste the following in the XML file:
    <?xml version="1.0" encoding="utf-8" ?>
    <root>
    	<mycompany.com>
    		<x>
    		</x>
    	</mycompany.com>
    </root>
    					
  5. Click the Data tab, and note that the code contains no errors.
  6. Click the XML tab, and then add the y element within x, as follows:
    <?xml version="1.0" encoding="utf-8" ?>
    <root>
    	<mycompany.com>
    		<x>
    			<y></y>
    		</x>
    	</mycompany.com>
    </root>
    					


Modification Type:MinorLast Reviewed:9/13/2005
Keywords:kbvs2002sp1sweep kbbug kbpending KB316687