XmlWriter.Xml
Overview
Writes given xml content as a child element.
Writes given xml content as a child element.
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.