public class XMLOutputFormat extends CommonMarkupOutputFormat<TemplateXMLOutputModel>
StringUtil.XMLEnc(String)). The ?html, ?xhtml and ?xml built-ins silently bypass
template output values of the type produced by this output format (TemplateXHTMLOutputModel).
This class was final before 2.3.29.
| Modifier and Type | Field and Description |
|---|---|
static XMLOutputFormat |
INSTANCE
The only instance (singleton) of this
OutputFormat. |
| Modifier | Constructor and Description |
|---|---|
protected |
XMLOutputFormat() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
escapePlainText(java.lang.String plainTextContent)
Should give the same result as
MarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.getMarkupString(TemplateMarkupOutputModel), but the implementation may uses a more efficient solution. |
java.lang.String |
getMimeType()
Returns the MIME type of the output format.
|
java.lang.String |
getName()
The short name used to refer to this format (like in the
#ftl header). |
boolean |
isLegacyBuiltInBypassed(java.lang.String builtInName)
Tells if a string built-in that can't handle a
TemplateMarkupOutputModel left hand operand can bypass
this object as is. |
protected TemplateXMLOutputModel |
newTemplateMarkupOutputModel(java.lang.String plainTextContent,
java.lang.String markupContent)
Creates a new
CommonTemplateMarkupOutputModel that's bound to this OutputFormat instance. |
void |
output(java.lang.String textToEsc,
java.io.Writer out)
Equivalent to calling
MarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.output(TemplateMarkupOutputModel, Writer), but the implementation may uses a more efficient solution. |
concat, fromMarkup, fromPlainTextByEscaping, getMarkupString, getSourcePlainText, isAutoEscapedByDefault, isEmpty, isOutputFormatMixingAllowed, outputtoString, toStringExtraPropertiespublic static final XMLOutputFormat INSTANCE
OutputFormat.public java.lang.String getName()
OutputFormat#ftl header).getName in class OutputFormatpublic java.lang.String getMimeType()
OutputFormatnull
null if this output format doesn't clearly corresponds to a specific MIME type.getMimeType in class OutputFormatpublic void output(java.lang.String textToEsc,
java.io.Writer out)
throws java.io.IOException,
TemplateModelException
MarkupOutputFormatMarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.output(TemplateMarkupOutputModel, Writer), but the implementation may uses a more efficient solution.output in class CommonMarkupOutputFormat<TemplateXMLOutputModel>java.io.IOExceptionTemplateModelExceptionpublic java.lang.String escapePlainText(java.lang.String plainTextContent)
MarkupOutputFormatMarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.getMarkupString(TemplateMarkupOutputModel), but the implementation may uses a more efficient solution.escapePlainText in class MarkupOutputFormat<TemplateXMLOutputModel>public boolean isLegacyBuiltInBypassed(java.lang.String builtInName)
MarkupOutputFormatTemplateMarkupOutputModel left hand operand can bypass
this object as is. A typical such case would be when a TemplateHTMLOutputModel of "HTML" format bypasses
?html.isLegacyBuiltInBypassed in class MarkupOutputFormat<TemplateXMLOutputModel>protected TemplateXMLOutputModel newTemplateMarkupOutputModel(java.lang.String plainTextContent, java.lang.String markupContent)
CommonMarkupOutputFormatCommonTemplateMarkupOutputModel that's bound to this OutputFormat instance.newTemplateMarkupOutputModel in class CommonMarkupOutputFormat<TemplateXMLOutputModel>