幾個時間已經問及這裏和那裏,一些答案與舊版本VS(這是使用V.S. 2012)有關。相同的表'名稱'不能在兩個嵌套關係中的子表
我再次提出這個問題:
給出一個xsd:
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="LocationType">
<xs:attribute name="X" type="xs:integer" />
<xs:attribute name="Y" type="xs:integer" />
</xs:complexType>
<xs:complexType name="AlphaNumericType">
<xs:sequence>
<xs:element name="AlphaNumericLocation" type="LocationType" />
</xs:sequence>
<xs:attribute name="id" type="xs:string" />
<xs:attribute name="key" type="xs:integer" />
</xs:complexType>
<xs:complexType name="BitmapType">
<xs:sequence>
<xs:element name="BitmapLocation" type="LocationType" />
<xs:element name="BitmapCaptions" type="AlphaNumericType" />
</xs:sequence>
<xs:attribute name="key" type="xs:string" />
<xs:attribute name="id" type="xs:string" />
</xs:complexType>
<xs:complexType name="ArcType">
<xs:sequence>
<xs:element name="ArcLocation" type="LocationType" />
<xs:element name="ArcCaptions" type="AlphaNumericType" />
</xs:sequence>
<xs:attribute name="key" type="xs:string" />
<xs:attribute name="id" type="xs:string" />
</xs:complexType>
<xs:element name="BitmapControls">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Bitmap" type="BitmapType" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ArcControls">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Arc" type="ArcType" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
通知 - 即具有杬的位置元素,位圖和弧的字母數字字符。
當我創建(使用XSD工具)的CS類和嘗試實例化它,我得到這個錯誤:
The same table 'AlphaNumericLocation' cannot be the child table in two nested relations.
我怎樣才能解決這個問題? (真正的xsd更復雜,並有更多「相似的類似」兒童.....
我想在我的應用程序中使用類型化數據集中的xml數據(它可以輕鬆讀取和解析xml) 。 ,我可以很容易地綁定表和列到其他控件...(網格)
這個xml是可以的。數據集版本是問題。我可以在設計器中看到xsd。我無法使用它... – Dani