| freemarker.template.TemplateNodeModel
All known Subclasses: freemarker.ext.xml.NodeListModel, freemarker.ext.dom.NodeModel,
TemplateNodeModel | public interface TemplateNodeModel extends TemplateModel(Code) | | Describes objects that are nodes in a tree.
If you have a tree of objects, they can be recursively
visited using the <#visit...> and <#recurse...>
FTL directives. This API is largely based on the W3C Document Object Model
(DOM) API. However, it is meant to be generally useful for describing
any tree of objects that you wish to navigate using a recursive visitor
design pattern.
since: FreeMarker 2.3 author: Jonathan Revusky |
getNodeName | String getNodeName() throws TemplateModelException(Code) | | a String that is used to determine the processingroutine to use. In the XML implementation, if the node is an element, it returns the element's tag name. If itis an attribute, it returns the attribute's name. It returns "@text" for text nodes, "@pi" for processing instructions,and so on. |
getNodeNamespace | String getNodeNamespace() throws TemplateModelException(Code) | | the XML namespace URI with which this node is associated. If this TemplateNodeModel implementation is not XML-related, it will almost certainly be null. Even for XML nodes, this will often be null. |
getNodeType | String getNodeType() throws TemplateModelException(Code) | | a String describing the type of node this is.In the W3C DOM, this should be "element", "text", "attribute", etc.A TemplateNodeModel implementation that models other kinds oftrees could return whatever it appropriate for that application. Itcan be null, if you don't want to use node-types. |
|
|