It's simpler than you'd think:

<!--- Get the XML content --->
<cfhttp url="http://steampowered.com/rss.xml"; method="GET" resolveurl="false">


<cfscript>
// Assign the XML Content to a variable.
xmlData = cfhttp.filecontent;

// Parse the XML into another variable.
rss = XMLParse(xmlData);

/*
        Search the parsed XML using an XPath expression
        and assign results (an array) to another variable.
*/
item = XMLSearch(rss, "//:item/");
</cfscript>

<cfoutput>
<cfloop index="x" from="1" to="#ArrayLen(item)#">
<table border="1">
<tr>
<td>
<strong>#item[x].category.xmlText#</strong>: <a href="#item[x].link.xmlText#">#item[x].title.xmlText#</a><br>
Published #item[x].pubDate.xmlText# by #item[x].author.xmlText# | <a href="#item[x].comments.xmlText#">Comments</a>
<blockquote>
#item[x]["content:encoded"].xmlText#
</blockquote>
</td>
</tr>
</table>
</cfloop>
</cfoutput>


HTH,

Adrian

Bailey, Neal wrote:

Hey Guys... How the heck do you parse RSS/RDF feeds with the <content:encoded> tag?
---------------------------------------------
- <content:encoded>
- <![CDATA[ My Formatted Text goes here.
]]> </content:encoded>
----------------------------------------------

----------------------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm





Reply via email to