Node variables

A node variable embodies a node in a tree structure. Node variables were introduced to help the handling of XML documents in the data-model, but they can be used for the modeling of other tree structures as well. For more information about nodes from the point of view of the template language read this earlier section.

A node variable has the following properties, provided by the methods of TemplateNodeModel interface:

On the FTL side, the direct utilization of node properties is done with node built-ins, and with the visit and recurse macros.

In most use cases, variables that implement TemplateNodeModel, implement other interfaces as well, since node variable properties just provide the basic infrastructure for navigating between nodes. For a concrete example, see how FreeMarker deals with XML.

FreeMarker Manual -- For FreeMarker 2.3.20
HTML generated: 2013-06-27 20:54:33 GMT
Edited with XMLMind XML Editor
Here!