Maya Dahan schrieb:
I am trying to work/populate the following XSD:
<xs:sequence maxOccurs="unbounded">
<xs:element name="nameElement" type="xs:string"/>
<xs:element name="nameValue" type="xs:string"/>
</xs:sequence>
The generated XML is not valid:
<Name>
<NameValue>NameValue</NameValue>
<NameValue>NameValue1</NameValue>
<NameElement>Name</NameElement>
<NameElement>Name1</NameElement>
</Name>
The generated xml *is* valid!
It should be:
<Name>
<NameValue>NameValue</NameValue>
<NameElement>Name</NameElement>
<NameValue>NameValue1</NameValue>
<NameElement>Name1</NameElement>
</Name>
Any ideas? Is this a bug? Is it fixed in a newer version of XMLBeans?
It is "by-design" because elements in a sequence (your NameValue and
NameElement) are *not* *ordered*. If you want to have
Element-Value-pairs you should declare a new type in your schema which
will have 1 element and 1 value, this new type can then be unbounded in
you name-type.
hope that helps, Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]