| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.misc.XmlEscape
public final class XmlEscape
Performs an XML escape of a given template fragment. Specifically, < > " ' and & are all turned into entities.
Usage:
 From java:
TemplateModelRoot root = new SimpleHash(); root.put( "xmlEscape", freemarker.ext.misc.XmlEscape.getInstance() ); ...
From your FM-Classic template:
The following is XML-escaped: <transform xmlEscape> <p>This paragraph has all XML special characters escaped.</p> </transform> ...
Note:
 XmlEscape is a singleton instance. Use the
 getInstance() method to retrieve instances of this model.
HtmlEscape, 
Serialized Form| Method Summary | |
|---|---|
| static XmlEscape | getInstance()Retrieve a singleton instance of this class. | 
|  boolean | isEmpty()Is the object empty? | 
|  void | transform(java.io.Reader source,
          java.io.Writer output)Transforms an XML-unescaped stream into XML-escaped form. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static XmlEscape getInstance()
XmlEscape class
public void transform(java.io.Reader source,
                      java.io.Writer output)
               throws java.io.IOException,
                      TemplateModelException
transform in interface TemplateTransformModel2source - the input to be transformedoutput - the destination of the transformation
java.io.IOException
TemplateModelException
public boolean isEmpty()
                throws TemplateModelException
isEmpty in interface TemplateModelfalse, to indicate this object is not empty
TemplateModelException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||