Ian Vaughan wrote:

>Getting the following error from my ocde below, any ideas folks?
>  
>
[snip]

>Document root element is missing.  
>Document root element is missing.  
>  
>
[snip]

Ian,

You need to read up on the usage of CFFILE and its actions. The action 
"upload" does not load the file into a variable, it moves the file from 
a temporary file created by the web server during the form submission to 
a real file some where on the harddisk of the server.  You still need to 
read the file in once you have uploaded it somewhere appropriate.

You have been told this previously by other response to your email. 
Please make sure you carefully read the responses you get and read the 
manual for the various CF tags and function you are using.

Below is some code to help you out. 

Regards

Stephen
=================================================
<cffile action="upload"
        filefield="UploadFile"
        destination="#GetTempDirectory()#"
        nameconflict="overwrite">

<cffile action="read"
        file="#GetTempDirectory()##cffile.serverfile#"
        variable="variables.thisXMLFile">

<CFSET variables.MyXML = XmlParse(variables.thisXMLFile)>

<CFSET variables.xnBuildingRecordset = variables.MyXML.XMLRoot>

<CFSET variables.xnSchemeUniqueRecordIdentifier = 
variables.xnBuildingRecordset.XMLAttributes["name"]>

<CFOUTPUT>
<P>The Number is #variables.xnSchemeUniqueRecordIdentifier#</P>
</CFOUTPUT>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191913
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to