1
我想爲社交網絡網站定義一個Smaple XML Schema。我定義了一個Person元素,它是相關屬性和其他子元素。它是我定義的模式。 :將元素定義爲xml架構中另一個元素的列表
<xs:element name="Person" type="Person" />
<xs:complexType name="Person">
<xs:sequence>
<xs:element name="firstName" type="xs:string"/>
<xs:element name="lastName" type="xs:string"/>
<xs:element name="nickName" type="xs:string"/>
<xs:element name="age" >
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="120"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="birthDate" type="xs:date"/>
<xs:element name="gender" type="Gender" />
<xs:element name="contactDetails" type="ContactInfo"/>
<xs:element name="occupation" type="Occupation" />
</xs:sequence>
</xs:complexType>
現在我要定義另一個孩子的人,因爲它的朋友,但我不知道我該怎麼做this.does任何機構對此有什麼想法?
非常感謝你,我該怎麼定義的關係附帶diferent人,兩個人的例子共同的朋友? – hamedkh
我不知道說實話。我不確定這應該在架構中定義,這可能是您在使用Linq到xml的代碼中發現的一件事。 –
非常感謝你 – hamedkh