Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
javman #1
XML File creation
I am generating xml output from a cfquery.
<cfxml variable="Contact" casesensitive="yes">
<Contact>
<cfoutput query="GetName">
<phonenum phone="#Phone#">
<first>#FirstName#</first>
<last>#LastName#</last>
</phonenum>
</cfoutput>
</Contact>
</cfxml>
<cfoutput>#Contact#</cfoutput>
When I use cfdump on the variable contact everythings seems perfect.
However <cfoutput>#Contact#</cfoutput> returns
coldfusion.xml.XmlNodeList@1497dd2 and that is about all.
There should be a nice xml file with about 15 entries and there is nothing at
all?
Writing the file to the server returns exactly the same thing. What am I doing
wrong.
javman Guest
-
File creation problems
Hi, I'm pretty new at writing extensions so I'm quite certain my problem is a mistake on my part. I've written a piece of code that takes a data... -
STC file creation automation
Is there a way to automate the creation of STC files? We find creating connection keys for our clients to be too much work, and it would be nice to... -
Automated CAR file creation?
Is their a way to automate CAR file creation? Thanks, ==Sci -
file creation & variables
I have a .cfm page that uses cffile to copy itself with the dynamic form content to create the new .cfm file. It works fine and creates the file.... -
Waiting file creation
Looking for insight on how I can wait until a file is created until I redirect to it... -
BSterner #2
Re: XML File creation
"Contact" is an xml document variable, not a simple string. Use 'toString' to get the string representation.
<cfoutput>#toString(Contact)#</cfoutput>
BSterner Guest
-
javman #3
Re: XML File creation
I appreciate the reply and suggestion but that did not make any difference at all. the output is the same as before.
javman Guest
-
BSterner #4
Re: XML File creation
The output to what, the screen, the file or both? Your cffile output should
look like...
<cffile file="#GetDirectoryFromPath(ExpandPath("*.*"))#\de lete.xml"
output="#toString(Contact)#" action="write" />
Can you post the exact code you are using. I tried this several times and it
worked fine. What version of CF r u using?
BSterner Guest
-
javman #5
Re: XML File creation
I kept working on this and you did have the answer. Many thanks.
I think the old failing results must have been cached by my browser.
I changed the code a little bit to
<cfset XMLContact=ToString(Contact)>
and reloaded the page, closed my browser and went online again and everything
worked fine.
javman Guest



Reply With Quote

