|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.coode.xml.XMLWriterImpl
public class XMLWriterImpl
Author: Matthew Horridge
The University Of Manchester
Medical Informatics Group
Date: 30-May-2006
Nested Class Summary | |
---|---|
class |
XMLWriterImpl.XMLElement
|
Constructor Summary | |
---|---|
XMLWriterImpl(java.io.Writer writer,
XMLWriterNamespaceManager xmlWriterNamespaceManager)
|
|
XMLWriterImpl(java.io.Writer writer,
XMLWriterNamespaceManager xmlWriterNamespaceManager,
java.lang.String xmlBase)
|
Method Summary | |
---|---|
void |
endDocument()
Causes all open elements, including the document root element, to be closed. |
java.lang.String |
getDefaultNamespace()
Gets the default namespace that the rdfwriter uses. |
XMLWriterNamespaceManager |
getNamespacePrefixes()
Gets the rdfwriter's namespace manager. |
java.lang.String |
getXMLBase()
|
void |
setEncoding(java.lang.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(java.lang.String rootElementName)
Starts writing the document. |
void |
writeAttribute(java.lang.String attr,
java.lang.String val)
Writes an attribute of the last element to be started (that has not been closed). |
void |
writeComment(java.lang.String commentText)
|
void |
writeEndElement()
Writes the closing tag of the last element to be started. |
void |
writeStartElement(java.lang.String name)
Writes the start of an element |
void |
writeTextContent(java.lang.String text)
Writes a text element |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLWriterImpl(java.io.Writer writer, XMLWriterNamespaceManager xmlWriterNamespaceManager)
public XMLWriterImpl(java.io.Writer writer, XMLWriterNamespaceManager xmlWriterNamespaceManager, java.lang.String xmlBase)
Method Detail |
---|
public java.lang.String getDefaultNamespace()
XMLWriter
getDefaultNamespace
in interface XMLWriter
public java.lang.String getXMLBase()
getXMLBase
in interface XMLWriter
public XMLWriterNamespaceManager getNamespacePrefixes()
XMLWriter
getNamespacePrefixes
in interface XMLWriter
public void setEncoding(java.lang.String encoding)
XMLWriter
setEncoding
in interface XMLWriter
encoding
- The encoding.public void setWrapAttributes(boolean b)
XMLWriter
setWrapAttributes
in interface XMLWriter
public void writeStartElement(java.lang.String name) throws java.io.IOException
XMLWriter
writeStartElement
in interface XMLWriter
name
- The tag name of the element to be written.
java.io.IOException
public void writeEndElement() throws java.io.IOException
XMLWriter
writeEndElement
in interface XMLWriter
java.io.IOException
public void writeAttribute(java.lang.String attr, java.lang.String val)
XMLWriter
writeAttribute
in interface XMLWriter
attr
- The name of the attributeval
- The value of the attributepublic void writeTextContent(java.lang.String text)
XMLWriter
writeTextContent
in interface XMLWriter
text
- The text to be writtenpublic void writeComment(java.lang.String commentText) throws java.io.IOException
writeComment
in interface XMLWriter
java.io.IOException
public void startDocument(java.lang.String rootElementName) throws java.io.IOException
XMLWriter
startDocument
in interface XMLWriter
rootElementName
- The name of the root element.
java.io.IOException
public void endDocument() throws java.io.IOException
XMLWriter
endDocument
in interface XMLWriter
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |