加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xsd – XML Schema元素顺序

发布时间:2020-12-16 07:44:07 所属栏目:百科 来源:网络整理
导读:在我的XSD中,我希望能够指定元素的顺序并不重要.这是我有的: xs:element name="ADT_A08_231_GLO_DEF" xs:complexType xs:sequence xs:element minOccurs="1" maxOccurs="1" name="EVN_EventTypeSegment" type="xs:string" / xs:element minOccurs="1" maxOc
在我的XSD中,我希望能够指定元素的顺序并不重要.这是我有的:
<xs:element name="ADT_A08_231_GLO_DEF">
  <xs:complexType>
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="EVN_EventTypeSegment" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="PID_PatientIdentificationSegment" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="PD1_PatientAdditionalDemographicSegment" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
</xs:element>

如何使EVN和PID元素在XML文件中随机(先是EVN,然后是PID或第一个PID元素,然后是EVN元素)?

<EVN_EventTypeSegment>Test</EVN_EventTypeSegment>
<PID_PatientIdentificationSegment>PIDTest</PID_PatientIdentificationSegment>

要么:

<PID_PatientIdentificationSegment>PIDTest</PID_PatientIdentificationSegment>
<EVN_EventTypeSegment>Test</EVN_EventTypeSegment>
使用xs:all而不是xs:sequence.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读