You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by "Steimke, Frank (Finanzen) Ref-36" <fr...@finanzen.bremen.de> on 2005/04/14 15:06:55 UTC

Missing addFoo method

Hi, I am new to XmlBeans. 

I have a simple Schema like this:

<xs:schema xmlns="http://www.beantest.org"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.beantest.org" elementFormDefault="qualified"
attributeFormDefault="unqualified">
	<xs:element name="root" type="rootType"/>
	<xs:complexType name="t1">
		<xs:sequence>
			<xs:element name="a" type="xs:string"/>
			<xs:element name="b" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="rootType">
		<xs:sequence>
			<xs:element name="e" type="t1" minOccurs="0"
maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

The <root>-Element has 0..N <e>-Elements as childs, each of them has <a> and
<b>-Elements as Childs.

I am using scomp from XMLBeans 2.0 beta 1 to compile this to java Classes.
For the rootType, there is a corresponding rootType.java Class. Since the
<e>-Element can occur multiple times in the rootType, i would expect all the
"Multiple Occurrence Methods", mentioned in the
"conMethodsForGeneratedJavaTypes" Guide, for rootType. 
Inspectiong the generated Java File, i find some of them, but there ist no
"addE" Method. There is only the "addNewE()" Method. 

I would like to generate a new <e> - Element first and add that to the End
of the list of all <e> - Elements within the rootType. How can i do this?
Why was no addE() Method generated from scomp?

Thanks in advance,
Frank