Re: Transform POJO/XML into another POJO/XML using Freemarker ????

Attila Szegedi <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
On Jul 1, 2008, at 12:59 PM, Daniel Dekany wrote:

> Tuesday, July 1, 2008, 12:19:50 PM, cmoulliard wrote:
>
>> Hi,
>>
>> I would like to know if it makes sense to use Freemarker to  
>> transform/map a
>> POJO into another POJO (idem but for XML to XML) ?
>
> FreeMarker's input can be anything (POJO-s), but the output is
> designed to be text. So in principle you can't do what you want.

Except if you feed the textual output to something that can rebuild  
POJOs from a textual representation. I'm thinking XStream here  
primarily, or maybe also some JSON implementation with Java-specific  
extensions.

Attila.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.