开发者

Possible xml deserialization bug

开发者 https://www.devze.com 2023-01-20 10:23 出处:网络
I\'m using the following xml schema entry to deserliaze some xml into an xsd generated block. <xs:element name=\"Action\">

I'm using the following xml schema entry to deserliaze some xml into an xsd generated block.

<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>

For some reason when I have the block

 <Action src="..."
         dst=".."
         create="yes"/>

Its returning the src and destination attributes corre开发者_JAVA技巧ctly, but it's also returning create and transform as "yes". The transform attribute should be null. Anybody know whats going on. Is my wee schema wrong somehow?

Thanks. Bob.

Thanks.


I found the problem. It's seems that the xml deseraliser gets confused if you don't have unique element names.

0

精彩评论

暂无评论...
验证码 换一张
取 消