Possible xml deserialization bug
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.
精彩评论