I think you need to ditch the "/" after "//:item/", like
Item = XMLSearch(rss, "//:item");

Don't you??? That's the only way I've ever been able to get it to work.
The way it is below I think it will still be looking for another
location step, right?

--Ferg

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Adrian J. Moreno
Sent: Monday, November 08, 2004 3:07 PM
To: [EMAIL PROTECTED]
Subject: Re: Parsing RSS/RDF Help...

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



----------------------------------------------------------
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