Hi,
I want to have same tag multiple times in my generated XML.
It's similar like multiple <property> tag inside one <bean> tag.
ex -
<bean class="com.ff.SubSection" id="id1">
<property ref="posPayItemIndex" name="index"/>
<property ref="crlfAssembler" name="assembler"/>
<property name="fields">
<list>
<bean class="com.ep.ff.transfer.format.NumberField" id="checkNumberField">
<property value="10" name="length"/>
<property value="amount" name="target"/>
</bean>
<bean class="com.ep.ff.transfer.format.NumberField" id="checkAmountField">
<property value="10" name="length"/>
<property value="amount" name="target"/>
</bean>
</list>
</property>
</bean>
I kind of achieved this by the below way.
[XmlAttribute (alias="id")]
public var id : String;
[XmlAttribute (alias="class")]
public var clsName : String;
[XmlElement(alias="property")]
public var property1 :PropertyXMLTag;
[XmlElement(alias="property")]
public var property2 :PropertyXMLTag;
[XmlElement(alias="property")]
public var property3 :PropertyXMLTag;
[XmlElement(alias="property")]
public var property4 :PropertyXMLTag;
[XmlElement(alias="property")]
public var property5 :PropertyXMLTag;
[XmlElement(alias="property")]
Here I have the limitation of max number of <property> tag since I have to define those as instance variable. Is there a way to make it dynamic depends upon the object creation.
Using list is not helping since it's creating one extra <list> tag before <property> tag. Kindly help.
Thanks,
Jyoti