我正在使用以下 RadRotator 从谷歌获取 RSS 提要:
<telerik:RadRotator ID="RadRotator1" RotatorType="AutomaticAdvance" ScrollDirection="Up"
ScrollDuration="2000" runat="server" DataSourceID="XmlDataSource1" Width="493"
ItemWidth="493" Height="192" ItemHeight="75" FrameDuration="1" InitialItemIndex="-1"
CssClass="rotator">
<%# XPath("item") %>
</ItemTemplate>
发生的事情是,当我这样做时,radgrid 中没有显示任何内容
<%# XPath("item") %>
请注意,我需要项目,因为它具有标题、说明等。您可以在下面的片段中看到
但如果我这样做
<%# XPath("description") %>
我看到了描述,但该项目是我需要的..
以下是 google rss xml 文件的片段:
<rss version="2.0"><channel><generator>NFE/1.0</generator><title>malaria - Google News</title><link>http://news.google.com/news?pz=1&ned=us&hl=en&q=malaria</link><language>en</language><webMaster>news-feedback@google.com</webMaster><copyright>©2012 Google</copyright><pubDate>Thu, 25 Oct 2012 14:56:08 GMT</pubDate><lastBuildDate>Thu, 25 Oct 2012 14:56:08 GMT</lastBuildDate><image><title>malaria - Google News</title><url>https://ssl.gstatic.com/news/img/logo/en_us/news.gif</url><link>http://news.google.com/news?pz=1&ned=us&hl=en&q=malaria</link></image><item><title>Malaria and Acquired Immunity - AllAfrica.com</title><link>http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNHNkVuoonL7HkcwkSoAldZPsWUvNg&url=http://allafrica.com/stories/201210251151.html</link><guid isPermaLink="false">tag:news.google.com,2005:cluster=http://allafrica.com/stories/201210251151.html</guid><pubDate>Thu, 25 Oct 2012 12:16:20 GMT</pubDate><description><table border="0" cellpadding="2" cellspacing="7" style="vertical-align:top;"><tr><td width="80" align="center" valign="top"><font style="font-size:85%;font-family:arial,sans-serif"></font></td><td valign="top" class="j"><font style="font-size:85%;font-family:arial,sans-serif"><br /><div style="padding-top:0.8em;"><img alt="" height="1" width="1" /></div><div class="lh"><a href="http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNHNkVuoonL7HkcwkSoAldZPsWUvNg&url=http://allafrica.com/stories/201210251151.html"><b><b>Malaria</b> and Acquired Immunity</b></a><br /><font size="-1"><b><font color="#6f6f6f">AllAfrica.com</font></b></font><br /><font size="-1">Even though the economic impact in Zambia has not yet been quantified, it is likely to be substantial due to the number of productive days lost due to the number of productive days lost due to <b>malaria</b>. The intensity of <b>malaria</b> in an area determines the <b>...</b></font><br /><font size="-1" class="p"></font><br /><font class="p" size="-1"><a class="p" href="http://news.google.com/news/more?ncl=dPdXW_JAl88mIRM&ned=us"><nobr><b>and more »</b></nobr></a></font></div></font></td></tr></table></description></item>
请注意,我只是想获取它的项目部分,因为该项目是描述等的包装。