I cant quite work out what to put in a binding in a situation that is so
simple it must be staring me in the face. The XML is

<code valid="true">22001</code>

the class is

class Code
{
    private String code;
    private boolean valid;
}

The binding goes something like

  <mapping name="code" class="Code">
    <value name="valid" field="valid" style="attribute"/>
    ????
  </mapping>

Just cant work out what I need. Tried various things without luck. The
'code' tag is swallowed by the mapping, so how can I get the string
inside the code element into the code field?

I want to use the mapping to unmarshal a list of elements along the
lines of

  <mapping name="codeRsp" class="CodeRsp">
    <value name="status" field="status" style="attribute"/>
    <collection field="codes" class="Code"/>
  </mapping>

Any ideas?

Thanks,
Paul


As far as the JiBX plan goes, I like the idea of getting a 1.0 out
sooner rather than later. Although JiBX is stable enough to use in
production, I get questions about why I am using beta software in
production. The answer is it passes all the tests so is fit for purpose
no matter the label, but some cant see past the label.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to