Using XML as a data-model

Kirill <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hello,
I am using an XML as a data-model, similar to this:

Map root = new HashMap();
root.put("doc", freemarker.ext.dom.NodeModel.parse(new
File("the/path/of/the.xml")));

Then, I can recurse through the document with <#recurse doc>, where
'doc' is a key name from the Map.

The question is - how can I refer to that 'doc' variable? For example,
if I don't know its' value and want to recurse through the XML
data-model.

So, if I do something like:

root.put(stringKeyName, freemarker.ext.dom.NodeModel.parse(new
File("the/path/of/the.xml")));

I need to be able to recurse in this manner:

<#recurse stringKeyName>

Thanks,
Kirill

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
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.