Skip to content

StartElement

Starts a new element with the specified name.

1
myXmlWriter.StartElement(name: string):XmlWriter

Starts a new element with the specified name and namespace.

1
myXmlWriter.StartElement(name: string, ns: string):XmlWriter

Parameters

string name
    name of element

string ns
    namespace of element

Remarks

This method creates a new element with the specified name and returns the current writer instance.

Example

1
2
3
4
var writer = $Xml.Create();
writer.StartElement('Customer');
writer.EndElement();
var xml = writer.ToXml();

This method creates a new element with the specified name and namespace and returns the current writer instance.

Example

1
2
3
4
var writer = $Xml.Create();
writer.StartElement('Customer', 'http://tempuri.org/');
writer.EndElement();
var xml = writer.ToXml();

See Also