Solved

CF and XML

Posted on 2004-04-15
3
295 Views
Last Modified: 2013-12-24
What are the tags in CF that allow processing of XML documents?
0
Comment
Question by:jl1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
CFDevHead earned 50 total points
ID: 10836635
<cfscript>
  URLToPull  = "http://www.somesite.com/rss/";
</cfscript>



<cfhttp url="#URLToPull#"
           method="GET"
           timeout="15">
</cfhttp>


<cfscript>
  XMLContent = trim(cfhttp.filecontent);
  XMLContent = XMLParse(XMLContent);
</cfscript>


<cfoutput>
    Feed provided by:<br>
    <a href="#XMLContent.rss.channel.image.link.xmlText#">
       <img src="#XMLContent.rss.channel.image.url.xmlText#" alt="#XMLContent.rss.channel.image.title.xmlText#" border="0">
    </a><br>
    #XMLContent.rss.channel.title.xmlText#<br>
    #XMLContent.rss.channel.description.xmlText#<br><br>
</cfoutput>


<cfloop from="1" to="#ArrayLen(XMLContent.rss.channel.item)#" index="idx">
 <hr>
 <cfoutput>
 <cfdump var="#XMLContent.rss.channel.item[idx]#"><!---
 <a href="#XMLContent.rss.channel.item[idx].link.xmlText#">#XMLContent.rss.channel.item[idx].title.xmlText#</a><br>
 #XMLContent.rss.channel.item[idx].description.xmlText#
 #ParagraphFormat(ReplaceNoCase(XMLContent.rss.channel.item[idx].description.xmlText, "&lt;", "<", "ALL"))#
Author: #XMLContent.rss.channel.item[idx].date.xmlText#<BR>
Author: #XMLContent.rss.channel.item[idx].date.xmlText#<BR>  --->

 </cfoutput>
</cfloop>



hope this helps


0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question