public class XmlTreeWriter extends XMLWriterBase implements XMLWriter
| Modifier and Type | Field and Description |
|---|---|
protected SOAPElement |
currentNode |
protected Document |
document |
protected Stack |
elementStack |
protected NamespaceSupport |
ns |
protected SOAPElement |
parentNode |
protected PrefixFactory |
pfactory |
| Constructor and Description |
|---|
XmlTreeWriter(Document document) |
| Modifier and Type | Method and Description |
|---|---|
protected SOAPElement |
addNewNode(String localName,
String prefix,
String uri) |
void |
close()
Close the writer and its underlying stream.
|
protected String |
createPrefix(String uri) |
void |
endElement()
Write the end tag for the current element.
|
void |
flush()
Flush the writer and its underlying stream.
|
protected String |
getKnownPrefix(String uri) |
String |
getPrefix(String uri)
Return a prefix for the given URI.
|
PrefixFactory |
getPrefixFactory()
Return the prefix factory in use by this writer.
|
protected static SOAPFactory |
getSoapFactory() |
String |
getURI(String prefix)
Return the URI for a given prefix.
|
protected String |
quote(String value) |
void |
setPrefixFactory(PrefixFactory factory)
Set the prefix factory to be used by this writer.
|
void |
startElement(String localName,
String uri)
Write the start tag for an element.
|
void |
startElement(String localName,
String uri,
String prefix)
Write the start tag for an element.
|
void |
writeAttribute(String localName,
String uri,
String value)
Write an attribute of the current element.
|
void |
writeAttributeUnquoted(String localName,
String uri,
String value)
Write an attribute (unquoted) of the current element.
|
void |
writeChars(CDATA chars)
Write character data within an element.
|
void |
writeChars(String chars)
Write character data within an element.
|
void |
writeCharsUnquoted(char[] buf,
int offset,
int len)
unsupport
|
void |
writeCharsUnquoted(String chars)
Write character data within an element, skipping quoting.
|
void |
writeNamespaceDeclaration(String uri)
Write a namespace declaration of the current element.
|
void |
writeNamespaceDeclaration(String prefix,
String uri)
Write a namespace declaration of the current element.
|
startElement, startElement, startElement, writeAttribute, writeAttribute, writeAttributeUnquoted, writeAttributeUnquoted, writeCommentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstartElement, startElement, startElement, writeAttribute, writeAttribute, writeAttributeUnquoted, writeAttributeUnquoted, writeCommentprotected Document document
protected SOAPElement currentNode
protected SOAPElement parentNode
protected PrefixFactory pfactory
protected NamespaceSupport ns
protected Stack elementStack
public XmlTreeWriter(Document document)
protected static SOAPFactory getSoapFactory() throws SOAPException
SOAPExceptionpublic void startElement(String localName, String uri)
XMLWriterstartElement in interface XMLWriterXMLWriter.startElement(String, String)protected SOAPElement addNewNode(String localName, String prefix, String uri) throws SOAPException
SOAPExceptionpublic void startElement(String localName, String uri, String prefix)
XMLWriterstartElement in interface XMLWriterXMLWriter.startElement(String, String,
String)public void writeAttribute(String localName, String uri, String value)
XMLWriterwriteAttribute in interface XMLWriterXMLWriter.writeAttribute(String, String,
String)public void writeAttributeUnquoted(String localName, String uri, String value)
XMLWriterwriteAttributeUnquoted in interface XMLWriterXMLWriter.writeAttributeUnquoted(String,
String, String)public void writeNamespaceDeclaration(String prefix, String uri)
XMLWriterwriteNamespaceDeclaration in interface XMLWriterXMLWriter.writeNamespaceDeclaration(
String, String)public void writeNamespaceDeclaration(String uri)
XMLWriterwriteNamespaceDeclaration in interface XMLWriterXMLWriter.writeNamespaceDeclaration(String)public void writeChars(String chars)
XMLWriterwriteChars in interface XMLWriterwriteChars in class XMLWriterBaseXMLWriter.writeChars(String)public void writeCharsUnquoted(String chars)
XMLWriterwriteCharsUnquoted in interface XMLWriterXMLWriter.writeCharsUnquoted(String)public void writeCharsUnquoted(char[] buf,
int offset,
int len)
writeCharsUnquoted in interface XMLWriterpublic void endElement()
XMLWriterendElement in interface XMLWriterXMLWriter.endElement()public PrefixFactory getPrefixFactory()
XMLWritergetPrefixFactory in interface XMLWriterXMLWriter.getPrefixFactory()public void setPrefixFactory(PrefixFactory factory)
XMLWritersetPrefixFactory in interface XMLWriterXMLWriter.setPrefixFactory(PrefixFactory)public String getURI(String prefix)
XMLWritergetURI in interface XMLWriterXMLWriter.getURI(String)public String getPrefix(String uri)
XMLWriterIf no prefix for the given URI is in scope, return null.
getPrefix in interface XMLWriterXMLWriter.getPrefix(String)public void flush()
XMLWriterpublic void close()
XMLWriterpublic void writeChars(CDATA chars)
XMLWriterwriteChars in interface XMLWriterwriteChars in class XMLWriterBaseCopyright © 2017–2019 Eclipse Foundation. All rights reserved.