Package | com.yworks.io.graphml.writer |
Interface | public interface IXmlWriter extends ILookup |
Implementors | DefaultXmlWriter |
Property | Defined By | ||
---|---|---|---|
document : XML [read-only]
Returns the document that was populated using this writer instance. | IXmlWriter |
Method | Defined By | ||
---|---|---|---|
addNamespace(ns:Namespace):void
Add a namespace declaration to the root element of the output. | IXmlWriter | ||
appendChild(xml:XML):void
Append an xml element to the current element. | IXmlWriter | ||
lookup(type:Class):Object
Returns an instance that implements the given type or null. | ILookup | ||
writeAttribute(localName:String, value:*, ns:Namespace = null):IXmlWriter
Write a Xml attribute node. | IXmlWriter | ||
writeComment(comment:String):IXmlWriter
Write a Xml comment node
| IXmlWriter | ||
Close the output. | IXmlWriter | ||
Close a XML element previously opened with writeStartElement. | IXmlWriter | ||
writePlainText(s:String):IXmlWriter
Write a string without an enclosing CDATA section. | IXmlWriter | ||
writeProcessingInstruction(target:String, pi:String):IXmlWriter
Write a Xml processing instruction
| IXmlWriter | ||
writeStartDocument(docTag:String, ns:Namespace = null):IXmlWriter
Begin the output process
| IXmlWriter | ||
writeStartElement(localName:String, ns:Namespace = null):IXmlWriter
Begin a new Xml element with given parameters. | IXmlWriter | ||
writeText(s:String):IXmlWriter
Write a text node. | IXmlWriter |
document | property |
document:XML
[read-only] Returns the document that was populated using this writer instance.
public function get document():XML
addNamespace | () | method |
public function addNamespace(ns:Namespace):void
Add a namespace declaration to the root element of the output.
Parameters
ns:Namespace — the namespace to be added.
|
appendChild | () | method |
public function appendChild(xml:XML):void
Append an xml element to the current element.
Parameters
xml:XML — The xml element to be added.
|
writeAttribute | () | method |
public function writeAttribute(localName:String, value:*, ns:Namespace = null):IXmlWriter
Write a Xml attribute node.
The attribute is attached to the closest open Xml element that has
been started with writeStartElement
If the prefix and/or namespace arguments are null, no namespace and prefix is used.
Parameters
localName:String — The local name of the attribute
| |
value:* — The value of this attribute
| |
ns:Namespace (default = null ) — The namespace of the attribute
|
IXmlWriter — The writer instance, to allow for output chaining
|
See also
writeComment | () | method |
public function writeComment(comment:String):IXmlWriter
Write a Xml comment node
Parameters
comment:String — The content of the comment
|
IXmlWriter — the writer instance, to allow for output chaining
|
writeEndDocument | () | method |
public function writeEndDocument():IXmlWriter
Close the output.
Attemps to write to the same document after this method has been called will have undefined results
ReturnsIXmlWriter — the writer instance, to allow for output chaining
|
writeEndElement | () | method |
public function writeEndElement():IXmlWriter
Close a XML element previously opened with writeStartElement
.
IXmlWriter — The writer instance, to allow for output chaining.
|
writePlainText | () | method |
public function writePlainText(s:String):IXmlWriter
Write a string without an enclosing CDATA section.
Parameters
s:String |
IXmlWriter |
writeProcessingInstruction | () | method |
public function writeProcessingInstruction(target:String, pi:String):IXmlWriter
Write a Xml processing instruction
Parameters
target:String — the target of the processing instruction (e.g. "xml-stylesheet" in <?xml-stylesheet ..>)
| |
pi:String — the processing instruction data
|
IXmlWriter — the writer instance, to allow for output chaining
|
writeStartDocument | () | method |
public function writeStartDocument(docTag:String, ns:Namespace = null):IXmlWriter
Begin the output process
Parameters
docTag:String | |
ns:Namespace (default = null ) — the document namespace or null
|
IXmlWriter — the writer instance, to allow for output chaining
|
writeStartElement | () | method |
public function writeStartElement(localName:String, ns:Namespace = null):IXmlWriter
Begin a new Xml element with given parameters.
All subsequent output is attched to this element until
writeEndElement
has been called or a new
element has been started.
Parameters
localName:String — The local name of this element
| |
ns:Namespace (default = null ) — The namespace of this element
If null , the default prefix for the given namespace is used.
|
IXmlWriter — the writer instance, to allow for output chaining
|
See also
writeText | () | method |
public function writeText(s:String):IXmlWriter
Write a text node.
Parameters
s:String — The content of the text node
|
IXmlWriter — The writer instance, to allow for output chaining
|