Thanks for sample, it works.
I think I found a difference with my code : the <addDefaults/> tag.
If I delete the addDefaults from your sample, it doesn't work any more
(as mine), no element is output.
I guess I had not understand the meaning of this tag but the problem
with addDefaults is that Betwixt adds all remaining elements. For
example if I use it :
<element name="recipients">
<element name="recipient" property="recipients"
adder="addRecipient" class="java.lang.String"/>
<addDefaults/>
</element>
<element name="shortcode" property="shortcode"/>
I got the following XML which duplicates the shortcode element:
<recipients>
<recipient>09089787767</recipient>
<recipient>767576565</recipient>
<shortcode>67778</shortcode>
</recipients>
<shortcode>67778</shortcode>
My problem is to control the order of the elements and I cannot do it
with the addDefaults tag (?)
--
Denis
Hello, here is some code for you. This code will create a class with a
LinkedList. The elements of this list are Strings. The whole structure
is parsed to XML. I have tried to parse the XML into a bean and it
works too, and re-parse to XML again. The code is attachement.
Hope this help you.
denis queffeulou escribió:
Sorry I've just read a mail in the archive for the subject [XXX]
I've found the DTD in another archive mail (but still no adder
attribute, which seems to have been replaced with updater ?)
So if I use :
<element name="recipients">
<element name="recipient" property="recipients"
updater="addRecipient"/>
</element>
The addRecipient method is called two times with a *null* parameter.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]