I am reading xml file. I would like to build string and insert at end. how can do that. any example.
I think <cffile action="append" will do.
Thanks
Maybe this will get you started.
Given this XML file:
<composers>
<modern>
<composer>
<name>Schoenberg</name>
</composer>
</modern>
</composers>
use this code:
<cffile action="read" file="c:\ColdFusion8\wwwroot\test\MyXml.xml"
variable="XMLFileText">
<cfset myXMLDocument=XmlParse(XMLFileText)>
<cfset ArrayAppend(myXMLDocument.composers.modern[1].XmlChildren,
XmlElemNew(myXMLDocument, 'composer')) />
<cfset myXMLDocument.composers.modern.XmlChildren[2].name =
XmlElemNew(myXMLDocument, 'name') />
<cfset myXmlDocument.composers.modern.XmlChildren[2].name.XmlText =
"Stravinsky" />
<cfdump var="#myXMLDocument#" />
See if that gets you anywhere near what you're trying to do.