Re: How to convert a list of object to XML

2007-07-03 Thread Matthias Fischer
Hi, >From reading the javadoc in the org.apache.struts2.views.xslt package, I believe yet another option would be to create a custom AdapterNode class for your Book object and register it with the XSLT AdapterFactory. If I read it correctly, Struts2 would use your BookAdapterNode class to rend

RE: How to convert a list of object to XML

2007-06-29 Thread John Krueger
may give you the xml that you are looking for. -- John > -Original Message- > From: Jorge Martín Cuervo [mailto:[EMAIL PROTECTED] > Sent: Friday, June 29, 2007 3:31 AM > To: Struts Users Mailing List > Subject: Re: How to convert a list of object to XML > > y

Re: How to convert a list of object to XML

2007-06-29 Thread Li
you can use xstream there are quite a few tools out there can help you achieve object->XML. The xstream site is here http://xstream.codehaus.org/ On 6/29/07, Jorge Martín Cuervo <[EMAIL PROTECTED]> wrote: you have to overwrite the toString method in class Book, and then iterate over the List t

Re: How to convert a list of object to XML

2007-06-29 Thread Jorge Martín Cuervo
you have to overwrite the toString method in class Book, and then iterate over the List to complete the xml. somthing like this: [...] public String toString() { return "" + id + "" + name + ""; } [...] public String list() { StringBuffer sb = new StringBuffer(""); for(It