I am outputting an XML document via Coldfusion, at present I have the
data from this file returning on the browser.
However I can I get this data to write to a text file comma seperated
..CSV file that the user can save ??
Any ideas, and is it achieveable in Coldfusion or would I have to write
a separate XSL stylesheet such as
----------- XSL SNIPPET-----------
<xsl:output method="text"/>
<xsl:template match="BuildingRecord">
<xsl:value-of select="normalize-space(SchemeUniqueRecordIdentifier)"/>,
<xsl:value-of
select="normalize-space(CompetentPerson/PersonRegistrationNumber)"/>,
-------------------------------------
My current COLDFUSION code is below
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>TEST XML</title>
</head>
<body>
<cffile action="upload"
filefield="UploadFile"
destination="#GetTempDirectory()#"
nameconflict="overwrite">
<cffile action="read"
file="#GetTempDirectory()##cffile.serverfile#"
variable="myxml">
<cfset mydoc=XmlParse(myxml)>
<CFSET BuildingRecordset = mydoc.XMLRoot>
<CFOUTPUT>
<strong>#mydoc.BuildingRecordset.SchemeName[1].XMLText# - Building
Control</strong>
<p></p>
Local Authority Code -
#mydoc.BuildingRecordset.LocalAuthorityCode[1].XMLText#
<p></p>
Name =
#mydoc.BuildingRecordset.BuildingRecord[1].CompetentPerson[1].PersonRegi
strationNumber[1].XMLText#
</CFOUTPUT>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193592
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