我的Wordpress网站是https://chasbroucktest.wordpress.com/2015/07/27/home/,它的RSS Feed是https://chasbroucktest.wordpress.com/feed/。我试图从" content :encoded“中抓取所有内容,包括html标签。到目前为止,我已经读取了RSS提要。
<cfset rssUrl = "https://chasbroucktest.wordpress.com/feed/">
<cffeed action="read" source="#rssUrl#" query="entries" properties="info">如何调用并输出content :encoded中的内容?
发布于 2015-07-30 21:17:06
我建议使用cfhttp标签的替代解决方案。读取rss并将xml解析为对象并搜索内容:编码
下面是一个示例代码。
<cfset rssUrl = "https://chasbroucktest.wordpress.com/feed/">
<cfhttp url="#rssUrl#" result="hello">
<cfset data = XmlParse(hello.Filecontent)>
<cfset content = XmlSearch(data,"//content:encoded/text()")>
<cfloop array="#content#" index="feed">
<cfoutput>#feed.XmlValue#</cfoutput>
</cfloop>https://stackoverflow.com/questions/31677510
复制相似问题