Name

XmlElemNew

Synopsis

                  XmlElemNew(XmlDocObj, ChildName)

Creates an empty child element in the specified XML document object. The following example creates a new element named Company in an XML document object called EmployeeXML. The XML document object is then output to the browser using cfdump:

<cfset EmployeeXml = XMLNew('no')>
<cfset EmployeeXml.XmlRoot = XmlElemNew(EmployeeXml,"company")>
   
<cfdump var="#EmployeeXml#">

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.