从xmldocument搜索特定的关键字 [英] specific keyword searching from xmldocument

查看:107
本文介绍了从xmldocument搜索特定的关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

专家您好,

我必须为带图像的IPL新闻添加rss新闻模块.

我正在使用以下rss链接.
http://www.indiatvnews.com/rssfeed/sports_cricket_news.php [

Hi expert,

I have to add rss news module for IPL news with images.

and i am using following rss link.
http://www.indiatvnews.com/rssfeed/sports_cricket_news.php[^]

But this rss news feeds is regarding cricket which showing all news from cricket.

Now how i can display those news result which contains only ipl keyword from above xml.

how i can search keyword from xml.

Please help me.
Thanks in advance.

推荐答案

有趣的问题:通过CDATA中的子字符串过滤XML ...

参见
http://stackoverflow.com/questions /568315/how-do-i-retrieve-element-text-inside-cdata-markup-via-xpath [
(未经测试).

有关包含"的更多信息:
http://www.w3schools.com/xpath/xpath_functions.asp [ ^ ]

希望对您有所帮助,
Intereting question: filtering XML by a substring in a CDATA...

See http://stackoverflow.com/questions/568315/how-do-i-retrieve-element-text-inside-cdata-markup-via-xpath[^] to get the contents of a CDATA in a XPath query.
You may need an XPath query like //item[fn:contains(/description/InnerText(),"IPL")]
(not tested).

More on ''contains'': http://www.w3schools.com/xpath/xpath_functions.asp[^]

Hope this helps,


这篇关于从xmldocument搜索特定的关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆