commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathalie Doremieux <natha...@newsoftwaremarketing.com>
Subject Re: Betwixt: BeanReader setup question
Date Tue, 08 Apr 2008 13:34:39 GMT
Andy,

thanks for your answer but I  need to be able to ignore fields on the 
XML side, not on the bean side.
I think I can better explain with an example

My bean has 2 elements
A
C

my XML has 3 elements
A
B
C

with that configuration I would like to be able to read A and C into my 
bean, but right now I only get A. I basically would like to be able to 
tell betwixt to ignore B in the XML as it does not map to anything in 
the bean. Is that possible? I know I can also write an XML validator and 
make sure my XML is the right format, but if there is a solution within 
betwixt it would be nice to know!

thanks for you help!

Nathalie

lenards@email.arizona.edu wrote:
> Nathalie,
>
> I was reading some examples and stumbled onto something.
>
> If you want to course-grain ignoring of properties, you can provide a
> suppression strategy to BeanReader that will cause all properties with 
> that
> name to be skipped.
>
> http://commons.apache.org/betwixt/guide/binding.html
>
> search for Ignoring Properties
>
> Andy
>
>
> /****************************************
>  * @author:  Andrew Lenards
>  * @email:   lenards@email.arizona.edu
>  * @title:   Systems Programmer, Principal
>  * @project: Tree of Life Web Project
>  * @website: http://tolweb.org/
>  * @dept:    Dept. of Entomology
>  * @school:  University of Arizona
>  * @geo-loc: Tucson, AZ 85721
>  ***************************************/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>


-- 
Nathalie Doremieux
New Software Marketing

www.newsoftwaremarketing.com



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message