XMLTools.Update

Update an XML node that you specify. This function accepts the following parameters:

ParameterDescriptionRequired
XML textA valid XML string.yes
XPath textThe XML node to update. Do not include the root.yes
New valueThe new value of the XML node.yes
Example
var xml = XMLTools.Update(
"<root> <s>hello world</s> <i>1</i> <o><k>v</k></o> <a>1</a> <a>2</a> <a><o><k>v</k></o></a> </root>",
"./a[3]",
"change_value"
);
Example output
"<root> <a> <b>-1</b> </a> <key>Hello World</key> </root>"