<xs:element name="data">
<xs:complexType>
<xs:sequence>
<xs:element name="ne_id" type="xs:string"/>
<xs:element name="ne_type" type="xs:string"/>
<xs:element name="ne_name" type="xs:string"/>
<xs:element name="vendor" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
以上schema中的第三行<xs:sequence>表示的意思是什么?
是不是说,在data元素中有多个ne_id,ne_type,ne_name,vendor元素吗?比如,有2个ne_id,2个ne_type等等。
还是说,在该xml文档中,或者该data父元素中可以包含多个data元素?
<xs:complexType>
<xs:sequence>
<xs:element name="ne_id" type="xs:string"/>
<xs:element name="ne_type" type="xs:string"/>
<xs:element name="ne_name" type="xs:string"/>
<xs:element name="vendor" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
以上schema中的第三行<xs:sequence>表示的意思是什么?
是不是说,在data元素中有多个ne_id,ne_type,ne_name,vendor元素吗?比如,有2个ne_id,2个ne_type等等。
还是说,在该xml文档中,或者该data父元素中可以包含多个data元素?
<xs:element name="ne_id" type="xs:string"/>
<xs:element name="ne_type" type="xs:string"/>
<xs:element name="ne_name" type="xs:string"/>
<xs:element name="vendor" type="xs:string"/>
子元素也只能有一套?
如果是这样的话,为什么要用<xs:sequence>呢?从字面上理解,<xs:sequence>不就是多个的意思吗?
那就是说,按照这种定义,我的xml文档里只会有1个data元素,而且data元素内也只会有一套
<xs:element name="ne_id" type="xs:string"/>
<xs:element name="ne_type" type="xs:string"/>
<xs:element name="ne_name" type="xs:string"/>
<xs:element name="vendor" type="xs:string"/>
元素呗?
是啊,这就是webservice里面的wsdl文件,设计文档中用到了这个文件做XML消息体的定义,也没有详细说明,所以我得知道<xs:element name="data">
<xs:complexType>
<xs:sequence>
<xs:element name="ne_id" type="xs:string"/>
<xs:element name="ne_type" type="xs:string"/>
<xs:element name="ne_name" type="xs:string"/>
<xs:element name="vendor" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
中<xs:sequence>的意思,要不然没办法写业务。你知道吗?要是知道的话,告诉我呗,谢谢了。