tinymce.dom.XMLWriter

Namespace tinymce.dom
Class XMLWriter
This class writes nodes into a XML document structure. This structure can then be serialized down to a HTML string later on.

Public Methods

Method Defined By
XMLWriter(s:Object)
Constructs a new XMLWriter.
XMLWriter
getContent():String
Returns a string representation of the elements/nodes written.
XMLWriter
reset():void
Resets the writer so it can be reused the contents of the writer is cleared.
XMLWriter
writeAttribute(n:String, v:String):void
Writes an attrubute like for example: myattr="valie"
XMLWriter
writeCDATA(v:String):void
Writes a CDATA section.
XMLWriter
writeComment(v:String):void
Writes a comment.
XMLWriter
Write the end of a element.
XMLWriter
Writes the end of a element.
XMLWriter
writeStartElement(n:String):void
Writes the start of an element like for example: <tag.
XMLWriter
writeText(v:String):void
Writes a text node value.
XMLWriter

Method details

XMLWriterconstructor

public function XMLWriter(s:Object)
Constructs a new XMLWriter.

Parameters

s:Object Optional settings object.

getContentmethod

public function getContent():String
Returns a string representation of the elements/nodes written.

Returns

String - String representation of the written elements/nodes.

resetmethod

public function reset():void
Resets the writer so it can be reused the contents of the writer is cleared.

writeAttributemethod

public function writeAttribute(n:String, v:String):void
Writes an attrubute like for example: myattr="valie"

Parameters

n:String Attribute name to write.
v:String Attribute value to write.

writeCDATAmethod

public function writeCDATA(v:String):void
Writes a CDATA section.

Parameters

v:String Value to write in CDATA.

writeCommentmethod

public function writeComment(v:String):void
Writes a comment.

Parameters

v:String Value of the comment.

writeEndElementmethod

public function writeEndElement():void
Write the end of a element. This will add a short end for elements with out children like for example a img element.

writeFullEndElementmethod

public function writeFullEndElement():void
Writes the end of a element. This will add a full end to the element even if it didn't have any children.

writeStartElementmethod

public function writeStartElement(n:String):void
Writes the start of an element like for example:

Parameters

n:String Name of element to write.

writeTextmethod

public function writeText(v:String):void
Writes a text node value.

Parameters

v:String Value to append as a text node.