- , RIAForge, , , :
http://cfrss.riaforge.org/
http://rssville.riaforge.org/
(, , , ), :
<cfhttp
url = "http://example.com"
resolveurl="no"
throwOnError = "yes"
timeout = "10" >
</cfhttp>
:
<cfset feedData = CFHTTP.FileContent>
<cfset xmlData = XMLParse(feedData)>
:
<cfset result = queryNew("title,description")>
<cfset items = xmlSearch(xmlData,"//*[local-name() = 'item']")>
<cfloop index="x" from="1" to="#arrayLen(items)#">
<cfif structKeyExists(items[x],"title")>
<cfset node.title = items[x].title.XmlText>
<cfelse>
<cfset node.title = "">
</cfif>
<cfif structKeyExists(items[x],"description")>
<cfset node.description = items[x].description.XmlText>
<cfelse>
<cfset node.description = "">
</cfif>
<cfset queryAddRow(result)>
<cfset querySetCell(result,"title",node.title)>
<cfset querySetCell(result,"description",node.description)>
</cfloop>
:
<cfoutput query="result">
<ul>
<li><strong>#title#</strong> - #description#</li>
</ul>
</cfoutput>
, , . , . , . , , , , . , , n , imo.