我正在寻找一种快速从ColdFusion字符串中解析HTML标记的方法。我们正在获取一个可能包含任何内容的RSS源。然后我们会对信息进行一些操作,最后将其输出到另一个地方。目前我们是使用正则表达式来处理。是否有更好的方法可以做到这一点?
<cfloop from="1" to="#ArrayLen(myFeed.item)#" index="i">
<cfset myFeed.item[i].description.value =
REReplaceNoCase(myFeed.item[i].description.value, '<(.|\n)*?>', '', 'ALL')>
</cfloop>
我们正在使用 ColdFusion 8。