XMLTools.Delete
Delete an XML node that you specify. This function accepts the following parameters:
Parameter | Description | Required |
---|---|---|
XML text | A valid XML string. | yes |
XPath text | The XML node to delete. Do not include the root. | yes |
Example
var xml = XMLTools.Delete(
"<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]"
);
Example output
"<root> <a> <b>-1</b> </a> <key>Hello World</key> </root>"
Updated 13 days ago