| Constructor and Description |
|---|
PrettyXMLWriter(PrintWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(String qName,
String value)
Add an un-qualified attribute to an element.
|
void |
attribute(String nsURI,
String localName,
String value)
Add an attribute to an element.
|
void |
close()
Close this XMLWriter, and it's underlying stream.
|
void |
closeTag(String qName)
Closes an un-qualified element.
|
void |
closeTag(String nsURI,
String localName)
Closes an element
|
void |
declareNamespace(String nsURI,
String prefixHint)
Hints that a namespace is going to be used in a sub-tree.
|
protected void |
numericalEntity(char c) |
void |
openTag(String qName)
Open a new unqualified XML tag.
|
void |
openTag(String nsURI,
String localName)
Open a new namespace-qualified XML tag.
|
void |
print(String data)
Prints some textual content in an element.
|
protected void |
printAttributeValue(String data) |
protected void |
printChars(String data) |
void |
println(String data)
Prints some textual content, terminated with a newline character.
|
void |
printRaw(String data)
Send raw data to the stream.
|
protected void |
writeIndent() |
public PrettyXMLWriter(PrintWriter writer)
public void declareNamespace(String nsURI, String prefixHint) throws IOException
XMLWriterdeclareNamespace in interface XMLWriternsURI - The namespace to declareprefixHint - A suggested prefix-string for this namespace.IOExceptionprotected void writeIndent()
throws IOException
IOExceptionpublic void openTag(String nsURI, String localName) throws IOException
XMLWriteropenTag in interface XMLWriternsURI - A URI for the namespace to uselocalName - The name of the tagIOExceptionpublic void openTag(String qName) throws IOException
XMLWriteropenTag in interface XMLWriterqName - The name of the tag.IOExceptionpublic void attribute(String nsURI, String localName, String value) throws IOException
XMLWriteropenTag command.attribute in interface XMLWriternsURI - A URI for the namespace to uselocalName - The name of the attributevalue - The textual value of the attributeIOExceptionpublic void attribute(String qName, String value) throws IOException
XMLWriteropenTag command.attribute in interface XMLWriterqName - The name of the attribute to setvalue - The textual value of the attributeIOExceptionpublic void closeTag(String nsURI, String localName) throws IOException
XMLWritercloseTag in interface XMLWriternsURI - A URI for the namespace to uselocalName - The name of the tagIOExceptionpublic void closeTag(String qName) throws IOException
XMLWritercloseTag in interface XMLWriterqName - The tag nameIOExceptionpublic void println(String data) throws IOException
XMLWriterprintln in interface XMLWriterIOExceptionpublic void print(String data) throws IOException
XMLWriterprint in interface XMLWriterIOExceptionpublic void printRaw(String data) throws IOException
XMLWriterprintRaw in interface XMLWriterdata - a string of data to include verbatim in the XML streamIOExceptionprotected void printChars(String data) throws IOException
IOExceptionprotected void printAttributeValue(String data) throws IOException
IOExceptionprotected void numericalEntity(char c)
throws IOException
IOExceptionpublic void close()
throws IOException
XMLWriterclose in interface XMLWriterIOExceptionCopyright © 2000–2016 BioJava. All rights reserved.