Skip to content

Parse

Parses the specified string as an XML node and returns the document element as an Xml instance.

1
myXml.Parse(xml: string):Xml

Parameters

string xml
    XML string to parse.

Returns

An Xml instance representing the parsed XML.

Remarks

Whitespace is preserved during XML parsing.

Parse an XML string and read a nested value

1
2
var myXml = $Xml.Parse('<doc><Customer><Name>hello</Name></Customer></doc>');
var name = myXml.Evaluate('//Customer/Name');

See Also