I've never been in a situation where create a document via the DOM was
necessary. cfsavecontent does the trick for me.

<cfsavecontent variable="foo">
<collection>
        <cfloop...>
        <file>some value</file>
        </cfloop>
</collection>
</cfsavecontent>

<cfset file_log = xmlParse(foo)>

-- 
mailto:[EMAIL PROTECTED]
Monday, June 16, 2003, 6:33:22 PM, you wrote:

OH> I have a newly created XML document:

OH>  <cfscript>
OH>         file_log = XmlNew();
OH>         file_log.xmlRoot = XmlElemNew(file_log, "Collection");
OH>         file_log.xmlRoot.XmlChildren[1] = XmlElemNew(file_log, "File");
OH>  </cfscript>

OH> I want to loop over some values and insert them, so the document ends up
OH> looking something like this:

OH> <collection>
OH>         <file>some value</file>
OH>         <file>some value</file>
OH>         <file>some value</file>
OH>         <file>some value</file>
OH> </collection>

OH> I'm trying to insert with some variation of: 

OH>  <cfset StructInsert(file_log.Collection.XmlAttributes, "File",
OH> "selectedElements[i].XmlAttributes.id#.pdf")> 

OH> But I keep getting this error with every thing I try:

OH> Missing argument name. When using named parameters to a function, every
OH> parameter must have a name.

OH> I'm not getting what I'm missing?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to