Additional top-level class in compilation unit: Tag.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | DEFAULT_INDENT_INCREMENT
Tab space indent for XML document |
| private String | |
| public static final String | EOL
End of line, value of 'line.separator' system property or '\n' |
| private static final Pattern | |
| private IBuffer | m_buffer
The buffer to hold the xml document |
| private String | m_currentIndent
A string of space character representing the current indentation. |
| private final Stack | m_tagStack
The stack of tags to make sure XML document is well formed. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | XMLStringBuffer(String
A string of spaces indicating the indentation at which to start the generation.
This constructor will not insert an start)<?xml prologue.
|
| public | XMLStringBuffer(IBuffer
The StringBuffer to use internally to represent the document. buffer, String A string of spaces indicating the indentation at which to start the generation. start)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | addEmptyElement(String
The name of the tag tagName, Properties A Properties file containing the attributes (or null) attributes)Add an empty element tag (e.g. |
| public void | |
| public void | addOptional(String
The name of the tag tagName, String The value for this tag value, Properties A Properties file containing the attributes (or null) attributes)Add an optional String element to the current tag. |
| public void | |
| public void | addOptional(String
The name of the tag tagName, String The value for this tag value)Add an optional String element to the current tag. |
| public void | addOptional(String
The name of the tag tagName, Boolean The value for this tag value, Properties A Properties file containing the attributes (or null) attributes)Add an optional Boolean element to the current tag. |
| public void | addOptional(String
The name of the tag tagName, Boolean The value for this tag value)Add an optional Boolean element to the current tag. |
| public void | addRequired(String
The name of the tag tagName, String The value for this tag value)Add a required element to the current tag. |
| public void | addRequired(String
The name of the tag tagName, String The value for this tag value, Properties A Properties file containing the attributes (or null) attributes)Add a required element to the current tag. |
| public void | |
| public void | |
| private Properties | |
| public String | |
| public IBuffer | |
| private void | |
| private void | |
| public void | |
| public void | |
| public void | push(String
The name of the tag. tagName, String The schema to use (can be null or an empty string). schema, Properties A Properties file representing the attributes (or null) attributes)Push a new tag. |
| public void | |
| public void | push(String
The name of the tag. tagName, Properties A Properties file representing the attributes (or null) attributes)Push a new tag. |
| public void | |
| public void | |
| public void | |
| public void | setDocType(String
The DOCTYPE string, without the "<!DOCTYPE " ">" docType)Set the doctype for this document. |
| public void | setXmlDetails(String
the XML version v, String the XML encoding enc)Set the xml version and encoding for this document. |
| public void | |
| public String |
| DEFAULT_INDENT_INCREMENT | back to summary |
|---|---|
| private static final String DEFAULT_INDENT_INCREMENT Tab space indent for XML document | |
| defaultComment | back to summary |
|---|---|
| private String defaultComment | |
| EOL | back to summary |
|---|---|
| public static final String EOL End of line, value of 'line.separator' system property or '\n' | |
| INVALID_XML_CHARS | back to summary |
|---|---|
| private static final Pattern INVALID_XML_CHARS | |
| m_buffer | back to summary |
|---|---|
| private IBuffer m_buffer The buffer to hold the xml document | |
| m_currentIndent | back to summary |
|---|---|
| private String m_currentIndent A string of space character representing the current indentation. | |
| m_tagStack | back to summary |
|---|---|
| private final Stack<Tag> m_tagStack The stack of tags to make sure XML document is well formed. | |
| XMLStringBuffer | back to summary |
|---|---|
| public XMLStringBuffer() | |
| XMLStringBuffer | back to summary |
|---|---|
public XMLStringBuffer(String start)
| |
| XMLStringBuffer | back to summary |
|---|---|
| public XMLStringBuffer(IBuffer buffer, String start) | |
| addCDATA | back to summary |
|---|---|
| public void addCDATA(String content) | |
| addComment | back to summary |
|---|---|
| public void addComment(String comment) | |
| addEmptyElement | back to summary |
|---|---|
| public void addEmptyElement(String tagName) Add an empty element tag (e.g.
| |
| addEmptyElement | back to summary |
|---|---|
| public void addEmptyElement(String tagName, Properties attributes) Add an empty element tag (e.g.
| |
| addEmptyElement | back to summary |
|---|---|
| public void addEmptyElement(String tagName, String... attributes) | |
| addOptional | back to summary |
|---|---|
| public void addOptional(String tagName, String value, Properties attributes) Add an optional String element to the current tag. If value is null, nothing is added.
| |
| addOptional | back to summary |
|---|---|
| public void addOptional(String tagName, String value, String... attributes) | |
| addOptional | back to summary |
|---|---|
| public void addOptional(String tagName, String value) Add an optional String element to the current tag. If value is null, nothing is added. | |
| addOptional | back to summary |
|---|---|
| public void addOptional(String tagName, Boolean value, Properties attributes) Add an optional Boolean element to the current tag. If value is null, nothing is added.
| |
| addOptional | back to summary |
|---|---|
| public void addOptional(String tagName, Boolean value) Add an optional Boolean element to the current tag. If value is null, nothing is added. | |
| addRequired | back to summary |
|---|---|
| public void addRequired(String tagName, String value) Add a required element to the current tag. An opening and closing tag will be generated even if value is null. | |
| addRequired | back to summary |
|---|---|
| public void addRequired(String tagName, String value, Properties attributes) Add a required element to the current tag. An opening and closing tag will be generated even if value is null.
| |
| addRequired | back to summary |
|---|---|
| public void addRequired(String tagName, String value, String... attributes) | |
| addString | back to summary |
|---|---|
| public void addString(String s) | |
| createProperties | back to summary |
|---|---|
| private Properties createProperties(String[] attributes) | |
| getCurrentIndent | back to summary |
|---|---|
| public String getCurrentIndent() | |
| getStringBuffer | back to summary |
|---|---|
public IBuffer getStringBuffer()
| |
| init | back to summary |
|---|---|
| private void init(IBuffer buffer, String start) | |
| init | back to summary |
|---|---|
private void init(IBuffer buffer, String start, String version, String encoding)
| |
| pop | back to summary |
|---|---|
| public void pop() Pop the last pushed element without verifying it if matches the previously pushed tag. | |
| pop | back to summary |
|---|---|
| public void pop(String tagName) Pop the last pushed element and throws an AssertionError if it doesn't match the corresponding tag that was pushed earlier.
| |
| push | back to summary |
|---|---|
| public void push(String tagName, String schema, Properties attributes) Push a new tag. Its value is stored and will be compared against the parameter passed to pop().
| |
| push | back to summary |
|---|---|
| public void push(String tagName, String schema) Push a new tag. Its value is stored and will be compared against the parameter passed to pop(). | |
| push | back to summary |
|---|---|
| public void push(String tagName, Properties attributes) Push a new tag. Its value is stored and will be compared against the parameter passed to pop().
| |
| push | back to summary |
|---|---|
| public void push(String tagName, String... attributes) | |
| push | back to summary |
|---|---|
| public void push(String tagName) Push a new tag. Its value is stored and will be compared against the parameter passed to pop().
| |
| setDefaultComment | back to summary |
|---|---|
| public void setDefaultComment(String defaultComment) | |
| setDocType | back to summary |
|---|---|
| public void setDocType(String docType) Set the doctype for this document.
| |
| setXmlDetails | back to summary |
|---|---|
| public void setXmlDetails(String v, String enc) Set the xml version and encoding for this document. | |
| toWriter | back to summary |
|---|---|
| public void toWriter(Writer fw) | |
| toXML | back to summary |
|---|---|
public String toXML()
| |