我正在使用以下 xml 模式条目将一些 xml 反序列化为 xsd 生成的块。
<xs:element name="Action">
<xs:complexType>
<xs:attribute name="src" type="xs:string" use="required" />
<xs:attribute name="dst" type="xs:string" use="required" />
<xs:attribute name="create" type="xs:string" use="optional" />
<xs:attribute name="transform" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
出于某种原因,当我遇到障碍时
<Action src="..."
dst=".."
create="yes"/>
它正确返回了 src 和 destination 属性,但它也将创建和转换返回为“是”。转换属性应为空。任何人都知道发生了什么事。我的小架构是不是有点错误?
谢谢。鲍勃。
谢谢。