Hi Again,
And thanks for the reply.
It throws an error saying >
"The selected method update was not found.
Either there are no methods with the specified method name and argument types,
or the method update is overloaded with arguments types that ColdFusion can't
decipher reliably. If this is a Java object and you verified that the method
exists, you may need to use the javacast function to reduce ambiguity.
<cfscript>
xmlFile.update('//blogs/blog[Name="Benefits"]/itunessubtitle', 'Nice
Music');
</cfscript>"
And the code ruuning is as follows
<cfset RunningLogPath = ExpandPath("blog.xml.cfm")>
<cfoutput>
<cffile action="read" file="#RunningLogPath#" variable="filecontent"
/></cfoutput>
<cfset xmlfile = XmlParse(filecontent) />
<cfscript>
xmlFile.update('//blogs/blog[Name="Benefits"]/itunessubtitle', 'Nice
Music');
</cfscript>
>Yeh, 'update' would be the one. There should be a write() method that
>will write the xml to the path you supply too, so:
>
><cfset xml = createobject('component', 'betterXmlEditor').init(xmlSource) />
><cfset xml.update('//PARTS/PART[MODEL="P3B-F"]/YEAR', '1973') />
><cfset xml.write(filepath) />
>
>Referencing elements is done using XPath. If you're not familiar,
>w3schools has a good tutorial - and/or you can post the xml and I'll
>give you some pointers.
>
>http://www.w3schools.com/Xpath/
>
>Dominic
>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316969
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4