Create a new node tree

Denis Bredelet <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hello

I would like to use FreeMarker for some XML transformation job. Is there a built-in way to create new nodes, so that I can make changes to the tree?
Is it better to output the new tree as text in the template?

<NewNode>
[#recurse children[0]]
   <NewNode2>
   [#recurse children[1]]
   </NewNode2>
</NewNode>

versus

[#assign NewNode = .node?new_child] (imaginary built-in)
[#assign NewNode[children[0]?node_name] = children[0]]
etc.

Thank you.
-- Denis.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
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.