Skip to content

SetValue

Sets the value of current node.

1
myXml.SetValue(value: any):void

Sets the value of all nodes on specified xpath.

1
myXml.SetValue(xpath: string, value: object):void

Parameters

any value
    Value to set

string xpath
    XPath of node to update.

Remarks

Updates with an xpath

1
$Xml.SetValue('//Customer/Id','1');

Updates the current node value

1
2
3
 var xml = $Xml.SelectSingle('//Customer/Id', function() {
 this.SetValue('1');
});

See Also