Appending an xml file
Hi,
I've created an xml document from a query and simply need after the document is created to append to this file so that each time the page is executed and I go to the directory where the file is stored, I can see all the submissions. The code works fine (when its run the first time) but after that I keep getting a "Only one top level element is allowed in an XML document" error. I've tried re-formatting the xml and playing with the attributes of the cffile tag to no avail.
Any thoughts??
Thanks in Advance
<CFOUERY NAME='qryGetResults" DATASOURCE="Kyo">
Select school_id
From tblSchool
Where school_id = 13
</CFQUERY>
<!--Careate xml document object containing data-->
<cfxml variable = "SchoolRec">
<TrainingRequest>
<cfoutput query="qryGetResults">
<Required>
<school_num>#school_id#</school_num>
<school_name>#school_name#</school_name>
</Required>
</cfoutput>
<TrainingRequest>
</cfxml>
<cfset xmltext = ToString (SchoolRec)>
<cffile action="append" file="c:\Temp\School.xml" output="xmltext">
