如何解决Delphi Rio 10.3.1 Xml 数据绑定与重复的段名称
我是 XML 处理和 Delphi 数据绑定向导的新手。
我正在尝试处理包含 2 个具有相同标识符名称但内容不同的段的 XSD 并且我发现解析器根本就缺少第二段,将第二段的数据细节与第一段的数据细节混淆。第二部分的数据类型细节被处理成单元但与任何组件无关
这是我拥有的架构 并且两者都有一个名称相同但内容不同的子段。当我处理 detalhead1 时,我只在其中找到了与 infohead1 相关的 detailhead1 段,而不是与 detailhead1 相关的段。 Ide 中是否有选项可以让它正确地分隔段? 在向导使用期间,我可以选择单个架构组件并更改与数据类型关联的标识符名称。关键是在向导的那一部分中,我只找到了一种数据类型(detailhead1 出现在 infohead1 中),而不是两者
这是具有简化数据详细信息的架构示例 (我不是我可以更改它的架构的所有者/处理者)
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="datas.xsd"/>
<xs:complextype name="Head1" minOccurs="0" maxOccurs="1">
<xs:sequence>
<xs:element name="Codeone" type="String6"/>
<xs:element name="Datahead1">
<xs:complexType>
<xs:sequence>
<xs:element name="infohead1">
<xs:complexType>
<xs:sequence>
<xs:element name="head1field">
<xs:complexType>
<xs:element name="fieldONE" type="string2"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Detailhead1" minOccurs="0" maxOccurs="999">
<xs:complexType>
<xs:sequence>
<xs:element name="head1field">
<xs:complexType>
<xs:element name="fieldTWO" type="string33"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complextype>
</xs:schema>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。