Solved

CF and XML

Posted on 2004-04-15
3
297 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

687 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