[英]How to read Atom Feed Xml in WPF
Last Time i posted my question here: How to read an Atom XAML File in WPF? 我上次在这里发布我的问题: 如何在WPF中读取Atom XAML文件? .It was related to How to Read Atom Xaml
. 这与How to Read Atom Xaml
。 One StackOverflow User posted answer that worked. 一个StackOverflow用户发布了有效的答案。 But how to read a rss/feed having username
or password
or having no extension with .xml
? 但是,如何读取具有username
或password
或没有.xml
扩展username
的rss / feed呢?
Here Code is: 这里的代码是:
XmlReader reader = XmlReader.Create(@"http://link1/myxaml.xml");
SyndicationFeed feed = SyndicationFeed.Load(reader);
var titles = from item in feed.Items
select new
{
item.Title.Text,
};
var descriptions = from item in feed.Items
select new
{
item.Summary.Text
};
foreach (var t in titles)
{
title_textbox.Text += t.Text + " "; //Your All Titles Here
}
foreach (var des in descriptions)
{
description_textbox.Text += des.Text + " "; //Your All Descriptions Here
}
Note: i am using WPF(C#) 注意:我正在使用WPF(C#)
please refer to this link : http://www.codeproject.com/Articles/94794/XML-Binding-in-WPF-with-Sample-RSS-Reader 请参考以下链接: http : //www.codeproject.com/Articles/94794/XML-Binding-in-WPF-with-Sample-RSS-Reader
this one is about XML Binding in WPF with Sample RSS Reader 这是关于带有示例RSS阅读器的WPF中的XML绑定
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.