1 52 53 package freemarker.ext.dom; 54 55 import org.w3c.dom.*; 56 import freemarker.template.*; 57 58 class CharacterDataNodeModel extends NodeModel implements TemplateScalarModel { 59 60 public CharacterDataNodeModel(CharacterData text) { 61 super(text); 62 } 63 64 public String getAsString() { 65 return ((org.w3c.dom.CharacterData ) node).getData(); 66 } 67 68 public String getNodeName() { 69 return (node instanceof Comment) ? "@comment" : "@text"; 70 } 71 72 public boolean isEmpty() { 73 return true; 74 } 75 } | Popular Tags |