<cfhttp url="http://feeds.feedburner.com/nhgconsulting" method="GET">

<cfscript>
    xmlfile = xmlparse(cfhttp.filecontent);
    xmlsize = 4;
    xmlqry = QueryNew("date, title, url");
    QueryAddRow(xmlqry,xmlsize);

    for(a=1;a LTE xmlsize;a=a+1) {
        QuerySetCell(xmlqry,"title",xmlfile.feed.entry[a].title.xmlText,a);
        QuerySetCell(xmlqry,"url",xmlfile.feed.entry[a].link.XMLAttributes.href,a);
        QuerySetCell(xmlqry,"date",xmlfile.feed.entry[a].published.xmlText,a);
    }
</cfscript>

<cfquery name="display_feeds" dbtype="query">
    SELECT *
    FROM xmlqry
</cfquery>

<div id="rssfeed">
    <cfset count = 4>
    <cfoutput query="display_feeds">
        <cfset new_date = Left(date, 10)>

        <p>#DateFormat(new_date, "MMMM D, YYYY")#<br />
        <a href="#url#">#title#</a></p>
        <cfif count GT 1><p><img src="images/rss_divider.gif" width="182" height="17" alt="" /></p></cfif>
        <cfset count = count - 1>
    </cfoutput>

</div>

About This Tutorial
Author: Nikole Gipps
Skill Level: Intermediate 
 
 
 
Platforms Tested: CFMX
Total Views: 78,324
Submission Date: March 18, 2007
Last Update Date: June 05, 2009
All Tutorials By This Autor: 1
Discuss This Tutorial
Advertisement


Website Designed and Developed by Pablo Varando.