Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用rss提要获取_C#_Windows Phone 7_Windows Phone 8 - Fatal编程技术网

C# 使用rss提要获取

C# 使用rss提要获取,c#,windows-phone-7,windows-phone-8,C#,Windows Phone 7,Windows Phone 8,这是我用来获取提要的代码,它工作正常,我正在绑定摘要。文本使用转换器绑定到文本块,但我需要获取内容。我搜索了很多,有些代码工作正常,但不是我想要的方式,所以任何帮助都会很好,提前感谢。要显示某些标记内的内容,请使用Regex.Match private void UpdateFeedList(string feedXML) { StringReader stringReader = new StringReader(feedXML); XmlReade

这是我用来获取提要的代码,它工作正常,我正在绑定摘要。文本使用转换器绑定到文本块,但我需要获取内容。我搜索了很多,有些代码工作正常,但不是我想要的方式,所以任何帮助都会很好,提前感谢。

要显示某些标记内的内容,请使用Regex.Match

  private void UpdateFeedList(string feedXML)
    {
        StringReader stringReader = new StringReader(feedXML);
        XmlReader xmlReader = XmlReader.Create(stringReader);
        SyndicationFeed feed = SyndicationFeed.Load(xmlReader);

        Deployment.Current.Dispatcher.BeginInvoke(() =>
        {
            feedListBox.ItemsSource = feed.Items;
        });
    }
此代码将从提要中获取标记。更改为所需的标签。

这可能对您有用。
your_content = Regex.Match(Item_with_your_content, @"<img\s+src='(.+)'\s+border='0'\s+/>").Groups[1].Value,