Hi,

i'm trying to map an optional child element which has only text content 
to a String field in my class:

class Foo {
     String bar;
}

The following configuration works but produces an empty element when the 
bar field is null:

<mapping class="Foo" name="Foo">
<structure name="Bar" usage="optional">
<value style="text" get-method="getBar" set-method="setBar" 
usage="optional"/>
</structure>
       ...
</mapping>

<Foo><Bar/>...</Foo>

I thought that the usage="optional" attribute was meant to produce an 
empty element in such cases ?

-- 
Sincerely,
Jan De Moerloose

Geosparc n.v.
http://www.geosparc.com
sponsor of http://www.geomajas.org


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to