Package freemarker.template.utility
Class DOMNodeModel
- java.lang.Object
-
- freemarker.template.utility.DOMNodeModel
-
- All Implemented Interfaces:
TemplateHashModel,TemplateModel
public class DOMNodeModel extends Object implements TemplateHashModel
A convenient wrapper class for wrapping a Node in the W3C DOM API.
-
-
Field Summary
-
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
-
Constructor Summary
Constructors Constructor Description DOMNodeModel(Node node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemplateModelget(String key)Gets a TemplateModel from the hash.booleanisEmpty()
-
-
-
Constructor Detail
-
DOMNodeModel
public DOMNodeModel(Node node)
-
-
Method Detail
-
get
public TemplateModel get(String key) throws TemplateModelException
Description copied from interface:TemplateHashModelGets a TemplateModel from the hash.- Specified by:
getin interfaceTemplateHashModel- Parameters:
key- the name by which the TemplateModel is identified in the template.- Returns:
- the TemplateModel referred to by the key, or null if not found.
- Throws:
TemplateModelException
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceTemplateHashModel
-
-