Last updated on
Jul 25, 2023
XmlDelete(xmlObject,childName)
Parameters
Parameter | Description |
xmlObject | The XML document object. |
childName | The child node or nodes in the XML object to be deleted. |
Example
<cfxml variable="xmlData"> <root> <item id="1">Item 1 <route>Route 1</route> <route>Route 2</route> </item> <item id="2">Item 2</item> <item id="3">Item 3</item> </root> </cfxml> <cfscript> writeDump(xmlData) XmlDelete(xmlData.root.item,"route") writeOutput("<br/>" & "Delete all child nodes for item id=1" & "<br/>") writeDump(xmlData) </cfscript>