xmlNew

Creates an XML document object.

xmlNew([casesensitive]) → returns xml

Argument Reference

casesensitive boolean
Default: false

Maintains the case of document elements and attributes.
Default: false
Values:
  • true
  • false

Examples
Sample code invoking the xmlNew function

Here, We created myXml by using xmlNew function. Then created root node(sampleXml) for myXml and set the rootnode text

<cfset myXml = xmlNew()>
<cfset myXml.XmlRoot = xmlelemnew(myXml,"sampleXml")>
<cfset myXml.sampleXml.XmlText ="This is root node text">
<cfdump var="#myXml#">

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub