【发布时间】:2016-06-21 15:38:51
【问题描述】:
我正在使用 C# 创建一个 XML 模式,但我发现了一个相当奇怪的标签序列,这是我之前从未使用过的。我希望它看起来像这样:
<xsd:complexType name="Sensor_Info">
<xsd:sequence>
<xsd:element name="Sensor" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="location_id" type="xsd:string"/>
<xsd:attribute name="unit" type="xsd:string"/>
<xsd:attribute name="min_value" type="xsd:int"/>
<xsd:attribute name="max_value" type="xsd:int"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="count" type="xsd:int"/>
如果你能帮助我,我很感激:)
【问题讨论】:
-
你有什么问题?
-
我正在使用 C# 创建此模式,但我不知道如何在上述序列中包含复杂类型
-
当你说你正在使用 C# 创建一个模式时,你到底是什么意思?你遇到了什么困难?
标签: c# xml visual-studio xsd schema