XmlElemNew

"-->
 XmlElemNew (elem, childName) 

Description

Creates a new XML element inside of an existing XML document at the specified position in the document.

Example

In this example, we use an XML file that is located on the test server. To try using this function, simply point the cffile to an XML file that exists on your server. You will also need to change the dot notation and child element to match your file.

 <cffile action="read" file="d:\cfusionmx\wwwroot\xml\users.xml" variable="XMLFileText">  <cfset myXMLDocument=XmlParse(XMLFileText)>  <cfdump var = #myXMLDocument#>  <cfset ArrayAppend(myXMLDocument.Users.sysuser[1].XmlChildren,  XmlElemNew(myXMLDocument,"phoneNumber"))>  <cfdump var = #myXMLDocument#>  


Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net