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

Display XML

Guest
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

Hi,

I have a CFM file where it should receive a URL query string make some process and then display the output as XML (it will be dynamic XML), so the XML is displayed on the browser , the XML is displayed as a text not a group of tags like any regular XML with + and - signs , is there anything should be considered?.
TOPICS
Advanced techniques

Views

241

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

correct answers 1 Correct answer

Deleted User
Jun 15, 2006 Jun 15, 2006
I think I found the solution , see the code below

<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<cfcontent type="text/xml">
<cfoutput>
<?xml version="1.0" encoding="utf-8"?>
<menu name="Menu">
<item>
<text>Home</text>
<link>/index.cfm</link>
</item>
<menu name="Products">
<item>
<text>JRun</text>
<link>/products/jrun.cfm</link>
</item>
<menu name="ColdFusion">
<item>
<text>ColdFusion Professional</text>
<link>/products/cfpro.cfm</link>
</item>
<item>
<text>ColdFusion Enterprise</t...

Votes

Translate

Translate
Guest
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

Try #HTMLEditFormat(XMLStringGoesHere)#

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
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

Thanks, but still it is not working , see the code below just for testing , i'm running it through a CFM file in the browser , i can only see it as text , I tried CFXML but didn't work too , I'm running CFMX 7 , thanks for any help!

<cfsavecontent variable="test">
<?xml version="1.0" encoding="utf-8"?>
<menu name="Menu">
<item>
<text>Home</text>
<link>/index.cfm</link>
</item>
<menu name="Products">
<item>
<text>JRun</text>
<link>/products/jrun.cfm</link>
</item>
<menu name="ColdFusion">
<item>
<text>ColdFusion Professional</text>
<link>/products/cfpro.cfm</link>
</item>
<item>
<text>ColdFusion Enterprise</text>
<link>/products/cfent.cfm</link>
</item>
<item>
<text>ColdFusion for J2EE</text>
<link>/products/cfj2ee.cfm</link>
</item>
</menu>
<item>
<text>Flash</text>
<link>/products/flash.cfm</link>
</item>
<item>
<text>Dreamweaver</text>
<link>/products/dw.cfm</link>
</item> </menu>
<item>
<text>Search</text>
<link>/search.cfm</link>
</item><item>
<text>Login</text>
<link>/logout.cfm</link>
</item>
</menu>
</cfsavecontent>
<cfoutput>
#HTMLEditFormat(test)#
</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
Guest
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

LATEST
I think I found the solution , see the code below

<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<cfcontent type="text/xml">
<cfoutput>
<?xml version="1.0" encoding="utf-8"?>
<menu name="Menu">
<item>
<text>Home</text>
<link>/index.cfm</link>
</item>
<menu name="Products">
<item>
<text>JRun</text>
<link>/products/jrun.cfm</link>
</item>
<menu name="ColdFusion">
<item>
<text>ColdFusion Professional</text>
<link>/products/cfpro.cfm</link>
</item>
<item>
<text>ColdFusion Enterprise</text>
<link>/products/cfent.cfm</link>
</item>
<item>
<text>ColdFusion for J2EE</text>
<link>/products/cfj2ee.cfm</link>
</item>
</menu>
<item>
<text>Flash</text>
<link>/products/flash.cfm</link>
</item>
<item>
<text>Dreamweaver</text>
<link>/products/dw.cfm</link>
</item> </menu>
<item>
<text>Search</text>
<link>/search.cfm</link>
</item><item>
<text>Login</text>
<link>/logout.cfm</link>
</item>
</menu>
</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
Resources
Documentation