Sist oppdatert
26. jul. 2023
Description
Removes a node from an XML document by specifying the node id.
Returns
None
Category
Syntax
XmlDeleteAt(xmlObject, position)
Parameters
Parameter | Description |
xmlObject | The XML object. |
position | The position of the child node to be deleted |
Example
<cfxml variable="xmlData"> <root> <item id="1">Item 1</item> <item id="2">Item 2</item> <item id="3">Item 3</item> </root> </cfxml> <cfscript> writeDump(xmlData) idToDelete=1 writeOutput("<br/>" & "The XML doc after deleting Item " & "#idToDelete#" & " is: ") XmlDeleteAt(xmlData.root.item,idToDelete) writeDump(xmlData) </cfscript>