Abstraction of XML output classes that provide a consistent way to write XML elements to some output
Type Details
- yFiles module
- view
Properties
Gets the namespace manager associated with this writer.
Property Value
Methods
Write an XML attribute with the given parameters.
Remarks
Parameters
A map of options to pass to the method.
- localName - string
- The name of the attribute.
- value - string
- The value of the attribute.
Returns
- ↪IXmlWriter
- The writer instance
writer
for writer chaining.
Writes an XML attribute node.
Remarks
Parameters
A map of options to pass to the method.
- prefix - string
- The namespace prefix of the attribute
- localName - string
- The local name of the attribute
- ns - string
- The namespace URI of this attribute
- value - string
- The value of this attribute
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Writes a CDATA section.
Parameters
A map of options to pass to the method.
- content - string
- The content of the CDATA section
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Writes an XML comment node
Parameters
A map of options to pass to the method.
- comment - string
- The content of the comment
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Writes a document fragment.
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Closes an XML element previously opened with writeStartElement or writeStartElement.
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Write an XML attribute from the given attribute
struct.
Parameters
A map of options to pass to the method.
- attribute - GraphMLXmlAttribute
- Encapsulates the current attribute values.
Returns
- ↪IXmlWriter
- The writer instance
writer
for writer chaining.
Writes an XML processing instruction.
Parameters
A map of options to pass to the method.
- target - string
- The target of the PI
- data - string
- The data of the PI
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Begins the output process.
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Begins a new XML element with given parameters
Remarks
Parameters
A map of options to pass to the method.
- prefix - string
- The namespace prefix to use for this element
- localName - string
- The local name of this element
- ns - string
- The namespace of this element
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Begin a new XML element with given parameters
Remarks
All subsequent output is attached to this element until writeEndElement has been called or a new element has been started.
This acts like writeStartElement, but uses the default prefix for the namespace
Parameters
A map of options to pass to the method.
- localName - string
- The local name of this element
- ns - string
- The namespace of this element
Returns
- ↪IXmlWriter
- The writer instance for further chaining
Writes a text node.
Remarks
s
will be correctly escapedParameters
A map of options to pass to the method.
- s - string
- The string that gets written as XML text
Returns
- ↪IXmlWriter
- The writer instance for further chaining