<cfquery name="qryDELETE" datasource="#request.dsn#">
DELETE FROM import_rp_file
</cfquery>
<cffile action="read" file="#xmluploadfolder#xmlimport.xml" variable="xmldoc">
<cfset mydoc = XmlParse(xmldoc)>
<!--- Create Variables to hold each section --->
<cfset FileID = xmlSearch(mydoc,'/root/Response/FileID')>
<cfset FileDate = xmlSearch(mydoc,'/root/Response/FileDate')>
<cfset Validation = xmlSearch(mydoc,'/root/Response/FileContents/PropertyInformation/Validation/Audit')>
<cfset SiteNow = xmlSearch(mydoc,'/root/Response/FileContents/PropertyInformation/SiteList/Site')>
<!--- Import File Info data --->
<cfset FileID = FileID[1].xmlText>
<cfset FileDate = FileDate[1].xmlText>
<cfquery name="qryInsertFileInfo" datasource="#request.dsn#">
INSERT INTO import_rp_File
(
FileID,
FileDate
)
VALUES
(
<cfqueryparam cfsqltype="cf_sql_varchar" value="#FileID#">,
<cfqueryparam cfsqltype="cf_sql_dater" value="#FileDate#">
)
</cfquery>
<cfoutput>
<cfloop from="1" to="#arraylen(SiteNow)#" index="i">
#SiteNow[i].XMLAttribute['EntID']#
</cfloop>
</cfoutput> |