commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: Betwixt - How to control the output in BeanToXml
Date Thu, 16 Sep 2004 21:46:58 GMT
(hopefully better late than never)

yes: use a custom object <-> string converter. see 
http://jakarta.apache.org/commons/betwixt/guide/binding.html for more 
details.

- robert

On 8 Sep 2004, at 04:07, ikuki.toh@nts.ricoh.co.jp wrote:

> hi, I am a beginner of commons.betwixt.
> I just wondering if Betwixt can do this and how : when convert a Bean 
> To
> Xml,
> Could betwixt recognize an object in the bean I input, and then change 
> the
> output
> of it to another object(exp : Date) in the XML?
>
>
> FOR EXAMPLE :  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> If there is a Calendar in myBean, could Betwixt just write it as a 
> Date in
> the output XML?
> // ====================================
> // If the Bean for convert is =>
> // ====================================
> public class MyBean {
>
>     private String id;
>     private String name;
>     private String[] emails;
>     ..........
>     private Calendar myCal;
>
>     ..........
>
> }
>
> // ====================================
> // The output XML I hoped is  =>
> // ====================================
> <?xml version='1.0' encoding='UTF-8'?>
> <mybean>
>   <String>id value</String>
>   <String>name value</String>
>   <String>email value</String>
>     ..........
>   <Date>Date value</Date>
>     ..........
> </mybean>
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> appreciate for any re, thanks!
>
> Dong
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


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


Mime
View raw message