public interface XMLWriter
| Modifier and Type | Method and Description |
|---|---|
void |
endDocument()
Causes all open elements, including the document root
element, to be closed.
|
XMLWriterNamespaceManager |
getNamespacePrefixes()
Gets the Writer's namespace manager.
|
String |
getXMLBase() |
void |
setEncoding(String encoding)
Sets the encoding for the document that the rdfwriter produces.
|
void |
setWrapAttributes(boolean b)
Causes the current element's attributes to be wrapped in the
output.
|
void |
startDocument(String rootElementName)
Starts writing the document.
|
void |
writeAttribute(String attr,
String val)
Writes an attribute of the last element to be started (that
has not been closed).
|
void |
writeComment(String commentText) |
void |
writeEndElement()
Writes the closing tag of the last element to be started.
|
void |
writeStartElement(String name)
Writes the start of an element.
|
void |
writeTextContent(String text)
Writes a text element
|
void setEncoding(String encoding)
encoding - The encoding.XMLWriterNamespaceManager getNamespacePrefixes()
String getXMLBase()
void setWrapAttributes(boolean b)
b - If true then the attributes will be wrapped if they are long. If false
then no attribute wrapping will occur.void startDocument(String rootElementName) throws IOException
rootElementName - The name of the root element.IOException - if there was an IO problemvoid endDocument()
throws IOException
IOException - if there was an IO problemvoid writeStartElement(String name) throws IOException, IllegalElementNameException
name - The tag name of the element to be written. This must be a valid QName.IOException - if there was an IO problemIllegalElementNameException - if the specified name is not a valid QNamevoid writeEndElement()
throws IOException
IOException - if there was an IO problemvoid writeAttribute(String attr, String val) throws IOException
attr - The name of the attributeval - The value of the attributeIOException - if there was an IO problemvoid writeTextContent(String text) throws IOException
text - The text to be writtenIOException - if there was an IO problemvoid writeComment(String commentText) throws IOException
IOExceptionCopyright © 2012 The University of Manchester. All Rights Reserved.