Re: T5: POJO to xml lib

2007-09-03 Thread Fidel Chavarria
Hi Angelo, you can use it like this: public class MyClass { public MyClass(Whatever what ever) { } public MyClass() {} public String toXML() { ByteArrayOutputStream stream = new ByteArrayOutputStream() ; try { XMLEncoder encoder = new

RE: T5: POJO to xml lib

2007-09-01 Thread Jonathan Barker
nal Message- > From: Angelo Chen [mailto:[EMAIL PROTECTED] > Sent: Saturday, September 01, 2007 1:07 AM > To: users@tapestry.apache.org > Subject: RE: T5: POJO to xml lib > > > Hi Jonathan, > > I tried XStream as suggested by 蝈蝈龙, it works, but library size is big >

Re: T5: POJO to xml lib

2007-09-01 Thread Angelo Chen
Hi Guoguo, XStream works well under T5, problem now is, it does not handle UTF-8, any tips on this too? Thanks. A.C. 蝈蝈龙 wrote: > > Indeed Castor is more portable than XStream. But XStream is stronger and > more simpler. > So you have to bear it's slightly bigger size. > But I find all the dep

Re: T5: POJO to xml lib

2007-08-31 Thread 蝈蝈龙
Indeed Castor is more portable than XStream. But XStream is stronger and more simpler. So you have to bear it's slightly bigger size. But I find all the dependency jars of XStream are about 3m not 5m. And cglib-nodep-2.1_3.jar,dom4j-1.6.1.jar,jdom-1.0.jar may be also used in other place. Cheers Gu

RE: T5: POJO to xml lib

2007-08-31 Thread Angelo Chen
Hi Jonathan, I tried XStream as suggested by 蝈蝈龙, it works, but library size is big around 5mb added, how big is the Castor? one nice thing about XSream is, I don't have to write any xml mapping, same with Castore? Thanks. A.C. Jonathan Barker wrote: > > > Try Castor at www.castor.org > > It

Re: T5: POJO to xml lib

2007-08-31 Thread Angelo Chen
Hi 蝈蝈龙, I tried XStream's toXML, it works, but not yet try writing to a file. one thing I notice is, the size of lib, the war file's size was increased from 1.9mb to 7mb, looks like XStream is larger than Tapestry's lib, right? 蝈蝈龙 wrote: > > is XStream good idea? > > 2007/9/1, Fidel Chavarr

RE: T5: POJO to xml lib

2007-08-31 Thread Jonathan Barker
Try Castor at www.castor.org It's a Java <-> XML tool that favors the Java side. It's easy by default, but can be very flexible. I use this the most. If you want to favor the XML side, then XMLBeans at Apache would be better. JB > -Original Message- > From: Angelo Chen [mailto:[EMAIL

Re: T5: POJO to xml lib

2007-08-31 Thread Angelo Chen
Hi Fidel, I have some problem with XMLEncoder: http://www.nabble.com/T5%3A-Can-XMLEncoder-be-used-with-T5-app--tf4362923s302.html how to use this xmlencode to avoid those exceptions? Thanks, A.C. Fidel Chavarria wrote: > > > > Hi, > you can use XMLEncoder/Decoder from java Api. > > make

Re: T5: POJO to xml lib

2007-08-31 Thread 蝈蝈龙
is XStream good idea? 2007/9/1, Fidel Chavarria <[EMAIL PROTECTED]>: > > > > > Hi, > you can use XMLEncoder/Decoder from java Api. > > make sure you don't do this in a page "delegate" this functionality to > your > the infrastructure layer. > > > Angelo Chen wrote: > > > > Hi, > > > > I have this

Re: T5: POJO to xml lib

2007-08-31 Thread Fidel Chavarria
Hi, you can use XMLEncoder/Decoder from java Api. make sure you don't do this in a page "delegate" this functionality to your the infrastructure layer. Angelo Chen wrote: > > Hi, > > I have this need to write/read some java objects to xml files in T5, can > anybody recommend one that works?