|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XmlWriter
Abstraction of XML output classes that provide a consistent way to write XML elements to some output.
Method Summary | |
---|---|
void |
flushDocument()
Close the document. |
XmlNamespaceManager |
getNamespaceManager()
Gets the XmlNamespaceManager manager associated with this writer. |
XmlWriter |
writeAttribute(GraphMLXmlAttribute attribute)
Write an XML attribute from the given attribute struct. |
XmlWriter |
writeAttribute(java.lang.String localName,
boolean value)
Convenience method to directly write a boolean valued XML attribute. |
XmlWriter |
writeAttribute(java.lang.String localName,
double value)
Convenience method to directly write a double valued XML attribute. |
XmlWriter |
writeAttribute(java.lang.String localName,
long value)
Convenience method to directly write a integer valued XML attribute. |
XmlWriter |
writeAttribute(java.lang.String localName,
java.lang.String value)
Write a XML attribute node. |
XmlWriter |
writeAttribute(java.lang.String prefix,
java.lang.String localName,
java.lang.String ns,
java.lang.String value)
Write a XML attribute node. |
XmlWriter |
writeCData(java.lang.String content)
Write a CDATA section. |
XmlWriter |
writeComment(java.lang.String comment)
Write a XML comment node. |
XmlWriter |
writeDocumentFragment(org.w3c.dom.DocumentFragment fragment)
Write a document fragment. |
void |
writeEndDocument()
Close the output. |
XmlWriter |
writeEndElement()
Close a XML element previously opened with writeStartElement(String,String) or
writeStartElement(String,String,String) . |
XmlWriter |
writeProcessingInstruction(java.lang.String target,
java.lang.String data)
Write a xml processing instruction. |
XmlWriter |
writeStartDocument()
Begin the output process. |
XmlWriter |
writeStartElement(java.lang.String localName,
java.lang.String ns)
Begin a new XML element with given parameters. |
XmlWriter |
writeStartElement(java.lang.String prefix,
java.lang.String localName,
java.lang.String ns)
Begin a new XML element with given parameters. |
XmlWriter |
writeText(java.lang.String s)
Write a text node. |
Method Detail |
---|
XmlWriter writeComment(java.lang.String comment)
comment
- The content of the comment
void writeEndDocument()
XmlWriter writeStartElement(java.lang.String prefix, java.lang.String localName, java.lang.String ns)
writeEndElement()
has been called or a new
element has been started.
prefix
- The namespace prefix to use for this elementlocalName
- The local name of this elementns
- The namespace of this element
XmlWriter writeStartElement(java.lang.String localName, java.lang.String ns)
All subsequent output is attached to this element until
writeEndElement()
has been called or a new
element has been started.
The if the namespace is declared in an enclosing scope, the prefix is used from this declaration, otherwise the namespace is declared as default namespace for this element.
localName
- The local name of this elementns
- The namespace of this element
XmlWriter writeAttribute(java.lang.String prefix, java.lang.String localName, java.lang.String ns, java.lang.String value)
writeStartElement(String,String)
or
writeStartElement(String,String,String)
.
prefix
- The namespace prefix of the attributelocalName
- The local name of the attributens
- The namespace URI of this attributevalue
- The value of this attribute
XmlWriter writeDocumentFragment(org.w3c.dom.DocumentFragment fragment)
fragment
- The fragment.
XmlWriter writeProcessingInstruction(java.lang.String target, java.lang.String data)
target
- The target of the PIdata
- The data of the PI
XmlWriter writeCData(java.lang.String content)
content
- The content of the CDATA section
XmlWriter writeEndElement()
writeStartElement(String,String)
or
writeStartElement(String,String,String)
.
XmlWriter writeStartDocument()
void flushDocument() throws GraphMLWriteException
GraphMLWriteException
XmlNamespaceManager getNamespaceManager()
XmlNamespaceManager
manager associated with this writer.
XmlWriter writeText(java.lang.String s)
s
will be correctly escaped
s
- The string that gets written as XML text
XmlWriter writeAttribute(java.lang.String localName, java.lang.String value)
writeStartElement(String,String)
or
writeStartElement(String,String,String)
.
localName
- The local name of the attributevalue
- The value of this attribute
XmlWriter writeAttribute(GraphMLXmlAttribute attribute)
attribute
struct.
attribute
- Encapsulates the current attribute values.
writer
for writer chaining.XmlWriter writeAttribute(java.lang.String localName, double value)
localName
- The local name of the attributevalue
- The value of this attribute
XmlWriter writeAttribute(java.lang.String localName, long value)
localName
- The local name of the attributevalue
- The value of this attribute
XmlWriter writeAttribute(java.lang.String localName, boolean value)
localName
- The local name of the attributevalue
- The value of this attribute
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |