XmlWriter.Element
Overview
Adds a new element with the specified name and value.
XmlWriter myXmlWriter.Element(name: string, value: ( string | number | boolean |
DateTimeOffset ))
Arguments
string name
name of element
( string | number | boolean | DateTimeOffset ) value
value of element
Remarks
This method creates a new element with the specified name and value and returns the current writer instance.
value is encoded with XML encoding rules.
Example
var writer = $Xml.Create();
writer.Element('Customer', 'Doe');
var xml = writer.ToXml();
// xml: <Customer>Doe</Customer>
Copyright © 2010 - 2023 Emakin. All rights reserved.