XmlClear

Description

Accepts an XML object as an argument and clears it.

Returns

None

Category

XML functions

Syntax

XmlClear(node)

Parameters

Parameter Description
node The XML node to clear.

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)
    XmlClear(xmlData.root.item[2])
    writeOutput("<br/>" & "The output after clearing the value of the second item:" & "<br/>")
    writeDump(xmlData)
</cfscript>

Try in CFFiddle

 Adobe

Get help faster and easier

New user?