在我的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>