I am trying to work/populate the following XSD:
                        <xs:element name="name">
                                <xs:complexType>
                                        <xs:sequence maxOccurs="unbounded">
                                                <xs:element name="nameElement" 
type="xs:string"/>
                                                <xs:element name="nameValue" 
type="xs:string"/>
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>

I am using the following code to set the values and examine the generated XML:
                NameDocument doc = NameDocument.Factory.newInstance();
                Name name = doc.addNewName();
                name.setNameValueArray(new String[] { "NameValue", "NameValue1" 
});
                name.setNameElementArray(new String[] { "Name", "Name1" });
                String text = doc.xmlText();
                System.out.println(text);

The generated XML is not valid:
<Name>
        <NameValue>NameValue</NameValue>
        <NameValue>NameValue1</NameValue>
        <NameElement>Name</NameElement>
        <NameElement>Name1</NameElement>
</Name>

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?

Thanks,

 Maya

_________________________________________________________________
PC Magazine’s 2007 editors’ choice for best Web mail—award-winning Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to