Nathalie,

With betwixt configuration (either in a global, app-level config or on a per
class with <class>.betwixt), you can ask Betwixt to ignore properties when
writing out a bean and reading in a bean.

ExampleNode.betwixt:
<?xml version='1.0' encoding='UTF-8' ?>
<info primitiveTypes='element'>
  <hide property='position'/>
  <element name='exampleNode'>
    <addDefaults/>
  </element>
</info>

I'm by no means an expert on betwixt or BeanReader.  But I got things to work
with .betwixt files, so that's what I've used in the cases where I'm leveraging
Betwixt.

You'll find some more information about .betwixt configuration in the "Getting
Started" page on the Betwixt page:

  http://commons.apache.org/betwixt/guide/start.html

I looked on the site for into about the global config approach and couldn't find
it.  I might have pulled it from the Jakarta Commons O'Reilly book. I have
access to Safari Online through my ACM membership, so I used that book a bit
when I started out.

I hope that helps,

Andy

Quoting Nathalie Doremieux <[EMAIL PROTECTED]>:
Currently the reader sends an exception when there is a mismatch between
the bean and the xml. is it possible to setup the reader to only send a
warning instead of an exception so that we can continue processing in
case there is an extra field and just ignore it?




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to