org.jfree.xml.writer
Class XMLWriter
A class for writing XML to a character stream.
XMLWriter(Writer writer) - Creates a new XML writer for the specified character stream.
|
XMLWriter(Writer writer, String indentString) - Creates a new XML writer for the specified character stream.
|
void | close() - Closes the underlying character stream.
|
void | writeCloseTag(String tag) - Writes a closing XML tag.
|
void | writeTag(String name, Properties attributes, boolean close) - use the attribute list instead ...
|
void | writeTag(String name, String attributeName, String attributeValue, boolean close) - Writes an opening XML tag with an attribute/value pair.
|
void | writeTag(String name, boolean close) - Writes an opening XML tag that has no attributes.
|
void | writeTag(String name, AttributeList attributes, boolean close) - Writes an opening XML tag along with a list of attribute/value pairs.
|
void | writeText(String text) - Writes some text to the character stream.
|
void | writeXmlDeclaration() - Writes the XML declaration that usually appears at the top of every XML
file.
|
allowLineBreak , decreaseIndent , endBlock , getIndentLevel , getLineSeparator , getSafeTags , increaseIndent , indent , normalize , startBlock , writeCloseTag , writeTag , writeTag , writeTag , writeTag |
XMLWriter
public XMLWriter(Writer writer)
Creates a new XML writer for the specified character stream. By
default, four spaces are used for indentation.
writer
- the character stream.
XMLWriter
public XMLWriter(Writer writer,
String indentString)
Creates a new XML writer for the specified character stream.
writer
- the character stream.indentString
- the string used for indentation (should contain
white space, for example four spaces).
close
public void close()
throws IOException
Closes the underlying character stream.
writeCloseTag
public void writeCloseTag(String tag)
throws IOException
Writes a closing XML tag.
writeTag
public void writeTag(String name,
Properties attributes,
boolean close)
throws IOException
use the attribute list instead ...
Writes an opening XML tag along with a list of attribute/value pairs.
name
- the tag name.attributes
- the attributes.close
- controls whether the tag is closed.
writeTag
public void writeTag(String name,
String attributeName,
String attributeValue,
boolean close)
throws IOException
Writes an opening XML tag with an attribute/value pair.
name
- the tag name.attributeName
- the attribute name.attributeValue
- the attribute value.close
- controls whether the tag is closed.
writeTag
public void writeTag(String name,
boolean close)
throws IOException
Writes an opening XML tag that has no attributes.
name
- the tag name.close
- a flag that controls whether or not the tag is closed
immediately.
writeTag
public void writeTag(String name,
AttributeList attributes,
boolean close)
throws IOException
Writes an opening XML tag along with a list of attribute/value pairs.
name
- the tag name.attributes
- the attributes.close
- controls whether the tag is closed.
writeText
public void writeText(String text)
throws IOException
Writes some text to the character stream.
writeXmlDeclaration
public void writeXmlDeclaration()
throws IOException
Writes the XML declaration that usually appears at the top of every XML
file.