Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Updates all nodes on specified xpath or current node value.

void myXml.SetValue(value: any)

Updates all nodes on specified xpath or current node value.

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

Arguments

any value
Value to set
string xpath
XPath of node to update. If not specified current node is used.

Example

Updates with an xpath

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

Example

Updates the current node value

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