我需要修复以下错误消息: 验证xml时发生错误元素'UserFields'具有无效的子元素'LastApproverID'。预期可能元素列表:'FirtApproverID'。
以下是用于验证xml架构的xsd:
<xs:element name="UserFields" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="FirtApproverID" type="xs:string" minOccurs="1" />
<xs:element name="LastApproverID" type="xs:string" minOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
firstapproverid和lastapproverid的顺序并不重要,但标签需要至少发生一次。
即可以出现
<UserFields>
<LastApproverID>123</LastApproverID>
<FirtApproverID>456</FirtApproverID>
</UserFields>
或
<UserFields>
<FirtApproverID>456</FirtApproverID>
<LastApproverID>123</LastApproverID>
</UserFields>