• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

XML from Query

New Here ,
Aug 15, 2006 Aug 15, 2006

Copy link to clipboard

Copied

I have a CFC webservice that return a query to my Flex application. I want it to return an XML built from that query. Anyone did this before or can give me a hand in this?

Thanks.
TOPICS
Advanced techniques

Views

336

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 15, 2006 Aug 15, 2006

Copy link to clipboard

Copied

I did it with the cfxml tag once.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 15, 2006 Aug 15, 2006

Copy link to clipboard

Copied

Another thing to remember is that you can have ColdFusion output XML in the exact same way that you have it output HTML. No difference to the ColdFusion engine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 15, 2006 Aug 15, 2006

Copy link to clipboard

Copied

Not sure but how about something like this...

<cfoutput>
<cfset qry = QueryNew("col_a,col_b") />
<cfset QueryAddRow(qry, 2) />

<cfset QuerySetCell(qry, "col_a", "column 1 : row 1", 1) />
<cfset QuerySetCell(qry, "col_b", "column 2 : row 1", 1) />

<cfset QuerySetCell(qry, "col_a", "column 1 : row 2", 2) />
<cfset QuerySetCell(qry, "col_b", "column 2 : row 2", 2) />

<cfwddx action="CFML2WDDX" input="#qry#" output="myWddx" />

<form>
<textarea cols="100" rows="20">#myWddx#</textarea>
</form>
</cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 15, 2006 Aug 15, 2006

Copy link to clipboard

Copied

LATEST
This code works for us. The reason the code is on one line is the requirement for there to be no blank lines in XML.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation