commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Sanders" <sand...@totalsync.com>
Subject Re: earth to digester
Date Fri, 02 Nov 2001 17:52:17 GMT
> > Are you saying you want Castor's capabilities, at least on the XML->Java
> > side?
>
> I don't know exactly what Castor does, I've only looked at it for an hour.
>
> > Something like on an element, try to find an attribute on the object at
the
> > top of the stack that corresponds by name to that element, and set the
> > attribute appropriately?
>
> The XML documents would probably have to attributes, all elements:
>
> <bean>
>   <attribute1>value1</attribute1>
>   <attribute2>value2</attribute2>
> </bean>
>
> and
>
> bean.setAttribute1(value1)
> bean.setAttribute2(value2)
>
> would be called. it obviously will get more complicated with nested
elements
> but that's the general idea.
>
This is EXACTLY what Castor can do.  You should have a deeper look, because
I think Castor can do this fairly well without a mapping file.  And as a
bonus, it will be able to reverse map the same object to XML.

Scott Sanders


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message