commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Éderson Marcos Ferreira <>
Subject Working with several Lists
Date Sat, 28 Jan 2006 19:32:18 GMT

I've been using Betwixt to convert xml file in JavaBeans. But I've
found some problems.
I have 4 classes: Config, Arrow, Tip and ElementB. In accordance with
the XML file below, inside of element 'elementA' I may have several
'arrow' elements and inside of element 'arrow' I may have several
'tip' elements, and after 'elementA' I have an 'elementB'. This works
almost perfectly, because Config class, used in the registerBeanClass
(reader.registerBeanClass(new InputSource(dotBetwixtDocument),
Config.class)), is constructed with the elements 'arrow'(which is a
List in Config class) and 'elementB', but for the element 'tip'(which
is a List in Arrow class) doesn't work. The attribute 'tip' in the
class Arrow is empty.

What it happens?
Thank's very much.
Ederson Ferreira

My XML file follows the structure below:
		<arrow att1="X" att2="Y" att3="Z">
		  <tip att4="W" att5="true" att6="false" />
		  <tip att4="U" att5="false" att6="true" />

		<arrow att1="K" att2="L" att3="M">
		  <tip att4="R" att5="true" att6="false" />
		  <tip att4="S" att5="false" att6="true" />
    <elementB att7="Q" />

My .betwixt document, inside application:
<?xml version='1.0' encoding='UTF-8' ?>
<info primitiveTypes='attribute'>
	<element name='config'>

		<element name='elementA'>
			<element name='arrow'
					<attribute name='att1' property='att1'/>
					<attribute name='att2' property='att2'/>
					<attribute name='att3' property='att3'/>

					<element name='tip'
						<attribute name='att4' property='att4'/>
						<attribute name='att5' property='att5'/>
						<attribute name='att6' property='att6'/>


		<element name='elementB'
			<attribute name='att7' property='att7'/>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message