Hi Joshua,

That one falls between the cracks in the current binding definition, I'm 
afraid. Really the <value> handling should check for the case where it's 
the only child of a named component, and allow the <value> element to 
have value-style="text" or "cdata" in this case. But I don't know that 
the current code generation would support this, and don't want to enable 
it because then it'd have to be supported.

I am hoping to get back to the JiBX 2.0 code by the end of this year, 
and will try to rationalize the whole binding definition structure as 
part of the 2.0 effort.

  - Dennis

Davies, Joshua wrote:
> I want to marshal something like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <topLevel>some text here</topLevel>
>
> (... yes, I know this is a really pointless use of XML ... these are the
> requirements I got ...)  It's easy enough to write a custom marshaller
> for this structure, but can anybody think of a way to define this in a
> binding file?  This doesn't work:
>
> <binding direction="output">
>   <mapping name="topLevel" class="XXX" field="YYY" />
> </binding>
>
> (<mapping> doesn't accept the field attribute) and neither does this:
>
> <binding direction="output">
>   <mapping name="topLevel" class="XXX">
>     <value field="YYY" />
>   </mapping>
> </binding>
>
> (value requires a "name" attribute).  I've tried a few permutations of
> structure elements, but with no luck.
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>   

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to