Skip to main content
Known Participant
December 23, 2008
Question

XML

  • December 23, 2008
  • 2 replies
  • 575 views
I wrote a code to generate the an .xml file. It doesnot work. Can any one find any mistake in the code.

code:
===============================

<cfquery datasource="Arunatest1" name="update">
select * from emp where deptno=10
</cfquery>

<cfxml variable="POXML">
<cfoutput>
<Productrequested Name="Test" PODATE="#Dateformat(now(),"mm/dd/yyyy")#" Supplier="UMUC web apps" SupplierName="Aruna"></cfoutput>
<Itemdetails>
<cfoutput query="Update">
<TaID> #emplid# </TaID>
<StuID> #deptno# </StuID>
<SSAN> #Name# </SSAN>
<Stu_Last> #City# </Stu_Last>
</cfoutput>
</Itemdetails>
<Productrequested>
</cfxml>

<cfoutput>
<cfset XMLTextForFile=ToString(POXML)>
<cfset varFile="..\student.xml">
<cffile action="write" file="#varFile#" output="#XMLTextForFile#">
</cfoutput>
This topic has been closed for replies.

2 replies

arunaumucAuthor
Known Participant
December 24, 2008
Ian,

I am sorry I was not eloborate, but I had some closing tag issues because of which the cfm file was not working. I corrected the syntax and it worked.

Thank you. Have a great Christmas.

Aruna
Inspiring
December 23, 2008
arunaumuc wrote:
> I wrote a code to generate the an .xml file. It doesnot work. Can any one find
> any mistake in the code.

Defining what "It Doesnot work." means can really up us find mistakes.
Does it produce an error message, if so what? Does it not process in an
expected manner, if so how?