public class XmlBuffer extends Object
Modifier and Type | Field and Description |
---|---|
protected String[] |
allowedEmptyTags |
static boolean |
checkWellFormed |
static String |
copyright |
static String[] |
DEFAULT_EMPTY_TAG_ALLOWED_LIST |
protected int |
state |
protected Stack<String> |
tagStack |
protected Writer |
writer |
Constructor and Description |
---|
XmlBuffer()
Creates a new instance of XmlBuffer
|
XmlBuffer(Writer writer)
Creates a new instance of XmlBuffer
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String name,
String value) |
void |
closeElement(String name) |
String |
escape(String s) |
String[] |
getAllowedEmptyTags() |
String |
getXml() |
void |
openElement(String name) |
void |
setAllowedEmptyTags(String[] allowedEmptyTags) |
String |
toString() |
void |
write(String text) |
void |
write(XmlBuffer buffer) |
void |
writeDoctype(String first,
String second,
String third,
String fourth) |
void |
writeNoHtmlEscape(String text) |
void |
writeXmlHeader(String encoding) |
public static final String copyright
public static boolean checkWellFormed
public static String[] DEFAULT_EMPTY_TAG_ALLOWED_LIST
protected final Writer writer
protected int state
protected String[] allowedEmptyTags
public XmlBuffer()
public XmlBuffer(Writer writer)
writer
- The writerpublic void closeElement(String name)
public void openElement(String name)
public void write(String text)
public void write(XmlBuffer buffer)
public void writeXmlHeader(String encoding)
public void writeNoHtmlEscape(String text)
public String getXml()
public String[] getAllowedEmptyTags()
public void setAllowedEmptyTags(String[] allowedEmptyTags)