- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
如果在 XMLDataSource 中使用标准 RSS 提要,过滤 RSS 提要以仅显示 RSS 提要项目描述包含特定术语的项目的最佳方法是什么?
例如,我希望过滤以下 RSS 提要,其中描述包含特定球队名称,例如“利物浦”
http://pipes.yahoo.com/pipes/pipe.run?_id=9dae054b43e8ded5a10a659c39c72f49&_render=rss
我设置 XML 数据源的代码如下:
HomeDataSource.DataFile = "http://pipes.yahoo.com/pipes/pipe.run?_id=9dae054b43e8ded5a10a659c39c72f49&_render=rss";
HomeDataSource.XPath = "rss/channel/item";
HomeListView.DataSourceID = "HomeDataSource";
HomeListView.DataBind();
使用以下源代码显示上述代码的输出:
<asp:ListView ID="HomeListView" runat="server">
<LayoutTemplate>
<ul>
<asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li><a target="_blank" href="<%#XPath("link")%>">
<%#XPath("title")%></a>
</li>
</ItemTemplate>
</asp:ListView>
非常感谢您提供的任何建议。
最佳答案
您将面临的问题是不同的提要类型,Atom、RSS 1.0/2.0 等,对某些公共(public)字段使用不同的名称。您可以创建自定义 DataSource 控件以公开 System.ServiceModel.Syndication SyndicationFeed 对象以进行绑定(bind)或读取后面代码中的提要并将 SyndicationFeed 或 SyndicationFeed.Items 绑定(bind)为 ListViews 数据源。
关于c# - RSS 提要 XMLDataSource 过滤器 RSS 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4640443/
我需要使用2列主键col1和col2从XML数据中选择不同的行: X X X X X X 我遇到了“上级兄弟”功能,但是找不到任何好的教程。如何选择不同的col1和co
我想使用一个简单的 xml 文件填充我的 DropDownList: foo bar baz 我的 XPath 是 /Databases/Database 我的下拉列表呈现为:
我想使用共享相同 XML 数据源的嵌套转发器,其中父转发器将数据源向下传递给子转发器,因此它不需要为父转发器中的每个数据项重新访问数据源。 父转发器的 XPATH:“/AdpDeselection/D
如果在 XMLDataSource 中使用标准 RSS 提要,过滤 RSS 提要以仅显示 RSS 提要项目描述包含特定术语的项目的最佳方法是什么? 例如,我希望过滤以下 RSS 提要,其中描述包含特定
我有一个 XmlDataSouce与电影和 Actor 。我想列出每部电影的指定 Actor 。我正在使用 ListView用 ClientIDMode="Predictable" 控制和一个 Cli
我正在使用 ASP.Net 2.0 并尝试在运行时使用 GridView 和 XMLDataSource 显示转换后的 xml 数据。 这是我的 xml 数据 (Input.xml): E
我正在使用 XmlDataSource作为 datasource对于 dropdownlist . 现在我想设置 SelectedValue页面最初加载时的下拉菜单。我试过 OnDataBound e
阿斯普克斯 C#代码 TreeXml.Data = getXMLString(); TreeXml.DataBind(); Sel
我正在尝试阅读此 Rss。 http://www.alhadath.net/.mrss/alhadath.xml 或者这个。 http://www.alarabiya.net/.mrss/ar/ara
我是一名优秀的程序员,十分优秀!