freemarker.template.utility
Class DOMNodeModel

java.lang.Object
  extended by freemarker.template.utility.DOMNodeModel
All Implemented Interfaces:
TemplateHashModel, TemplateModel

public class DOMNodeModel
extends java.lang.Object
implements TemplateHashModel

A convenient wrapper class for wrapping a Node in the W3C DOM API.

Author:
Jonathan Revusky

Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
DOMNodeModel(org.w3c.dom.Node node)
           
 
Method Summary
 TemplateModel get(java.lang.String key)
          Gets a TemplateModel from the hash.
 boolean isEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMNodeModel

public DOMNodeModel(org.w3c.dom.Node node)
Method Detail

get

public TemplateModel get(java.lang.String key)
                  throws TemplateModelException
Description copied from interface: TemplateHashModel
Gets a TemplateModel from the hash.

Specified by:
get in interface TemplateHashModel
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:
isEmpty in interface TemplateHashModel