XmlWriter.Xml

Overview

Writes given xml content as a child element.

XmlWriter myXmlWriter.Xml(value: ( string | Xml ))

Writes given xml content as a child element.

XmlWriter myXmlWriter.Xml(elementName: string, value: ( string | Xml ))

Arguments

( string | Xml ) value

value to write

string elementName

name of element

Remarks

This method writes the specified value to the current element as a child element and returns the current writer instance.

Example

var writer = $Xml.Create(); writer.StartElement('Customer'); writer.Xml('<Name>Doe</Name>'); writer.EndElement(); var xml = writer.ToXml(); // xml: <Customer><Name>Doe</Name></Customer>

Example

var writer = $Xml.Create(); writer.Xml('Customer', '<Name>Doe</Name>'); var xml = writer.ToXml(); // xml: <Customer><Name>Doe</Name></Customer>

Copyright © 2010 - 2023 Emakin. All rights reserved.