How Do I Append to a to the xml file and add more employee records?

The output i get writes the append at the bottom of the xml file and not
within the structure as i would like. Any Ideas...do you use ArrayAppend
or ArrayInsertAt? If anyone knows can they walk me through...thanks

Chris

###################################################################

My example code....

<cfset Path='C:\Inetpub\wwwroot\EMP\uploads\'>

<!--- SET DEFAULT VALUES --->
<CFPARAM NAME="FORM.Up_fname" DEFAULT="">
<CFPARAM NAME="FORM.Up_lname" DEFAULT="">
<CFPARAM NAME="Updated" DEFAULT="N">

<!--- SET XML VALIABLES AND STRUCTURE --->
<CFXML variable="xmlEMPLOYER">
     <EMPLOYER>
                <Employees><cfoutput>
                                <emp_code id="#XMLFormat(SESSION.employee)#">
                        <emp_name>#XMLFormat(FORM.Up_fname)#</stud_name>
                                        
<emp_name2>#XMLFormat(FORM.Up_lname)#</stud_name2>
                                        <updated>#XMLFormat(Updated)#</updated>
                                </stud_code></cfoutput>
        </Employees> 
     </EMPLOYER>
</cfxml>


<!--- <cfdump var="#VARIABLES#">
<cfabort> --->

<cfset xml = #ToString(xmlEMPLOYER)#>

<cffile action="append" addnewline="yes" file="#Path#employees.xml" 
output="#xml#">

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to