public class XHTMLWikiPrinter extends XMLWikiPrinter
wikiWriter, xmlWriter
Constructor and Description |
---|
XHTMLWikiPrinter(WikiPrinter printer) |
Modifier and Type | Method and Description |
---|---|
void |
printRaw(String raw)
Print some text without escaping anything, it's supposed to be XML or at least contains only valid characters in
XML text node.
|
void |
printSpace()
This method should be used to print a space rather than calling
printXML(" ") . |
void |
printXML(String str)
Print provided text.
|
void |
printXMLComment(String content)
Print a XML comment.
|
void |
printXMLComment(String content,
boolean escape)
Print a XML comment.
|
void |
printXMLElement(String name)
Print the xml element.
|
void |
printXMLElement(String name,
Map<String,String> attributes)
Print the xml element.
|
void |
printXMLElement(String name,
String[][] attributes)
Print the xml element.
|
void |
printXMLEndCData()
End a CDATA section.
|
void |
printXMLEndElement(String name)
Print the end tag of xml element.
|
void |
printXMLStartCData()
Start a CDATA section.
|
void |
printXMLStartElement(String name)
Print the start tag of xml element.
|
void |
printXMLStartElement(String name,
Attributes attributes)
Print the start tag of xml element.
|
void |
printXMLStartElement(String name,
Map<String,String> attributes)
Print the start tag of xml element.
|
void |
printXMLStartElement(String name,
String[][] attributes)
Print the start tag of xml element.
|
void |
setStandalone()
Use it to specify that the current element to print is standalone.
|
getXMLWriter, printEntity, setWikiPrinter
public XHTMLWikiPrinter(WikiPrinter printer)
printer
- the object to which to write the XHTML output to@Unstable public void setStandalone()
entity. Note that the standalone value is automatically reset after first printing of a space, or when a text
is printed.public void printXML(String str)
XMLWikiPrinter
printXML
in class XMLWikiPrinter
str
- the string to printpublic void printXMLElement(String name)
XMLWikiPrinter
<name/>
.printXMLElement
in class XMLWikiPrinter
name
- the xml element to printpublic void printXMLElement(String name, String[][] attributes)
XMLWikiPrinter
<name att1="value1" att2="value2"/>
.printXMLElement
in class XMLWikiPrinter
name
- the xml element to printattributes
- the xml attributes of the element to printpublic void printXMLElement(String name, Map<String,String> attributes)
XMLWikiPrinter
<name att1="value1" att2="value2"/>
.printXMLElement
in class XMLWikiPrinter
name
- the xml element to printattributes
- the xml attributes of the element to printpublic void printXMLStartElement(String name)
XMLWikiPrinter
<name>
.printXMLStartElement
in class XMLWikiPrinter
name
- the xml element to printpublic void printXMLStartElement(String name, String[][] attributes)
XMLWikiPrinter
<name att1="value1" att2="value2">
.printXMLStartElement
in class XMLWikiPrinter
name
- the xml element to printattributes
- the xml attributes of the element to printpublic void printXMLStartElement(String name, Map<String,String> attributes)
XMLWikiPrinter
<name att1="value1" att2="value2">
.printXMLStartElement
in class XMLWikiPrinter
name
- the xml element to printattributes
- the xml attributes of the element to printpublic void printXMLStartElement(String name, Attributes attributes)
XMLWikiPrinter
<name att1="value1" att2="value2">
.printXMLStartElement
in class XMLWikiPrinter
name
- the xml element to printattributes
- the xml attributes of the element to printpublic void printXMLEndElement(String name)
XMLWikiPrinter
</name>
.printXMLEndElement
in class XMLWikiPrinter
name
- the xml element to printpublic void printXMLComment(String content)
XMLWikiPrinter
--
characters (or -
if it's the last character). If you're not sure what the comment content will be
use XMLWikiPrinter.printXMLComment(String, boolean)
instead, passing true for the second parameter.printXMLComment
in class XMLWikiPrinter
content
- the comment contentpublic void printXMLComment(String content, boolean escape)
XMLWikiPrinter
printXMLComment
in class XMLWikiPrinter
content
- the comment contentescape
- indicate if comment content has to be escaped. XML content does not support -- and - (when it's the
last character). Escaping is based on backslash. "- --\ -" give "- \-\-\\ \-\ ".public void printXMLStartCData()
XMLWikiPrinter
printXMLStartCData
in class XMLWikiPrinter
public void printXMLEndCData()
XMLWikiPrinter
printXMLEndCData
in class XMLWikiPrinter
public void printSpace()
printXML(" ")
.public void printRaw(String raw)
XMLWikiPrinter
printRaw
in class XMLWikiPrinter
raw
- the contentCopyright © 2004–2021 XWiki. All rights reserved.