2013-05-03 63 views
1
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; 
     }); 
    } 

這是我使用獲得提要的代碼,它工作正常,我使用一個轉換器,但我綁定Summary.Text給TextBlock需要得到的內容一些如何,我搜索了很多,一些代碼的作品,但不是我想要的方式,所以任何幫助將是偉大的,在此先感謝。獲取<內容:編碼>使用RSS訂閱

+0

This [answer](http://stackoverflow.com/questions/1121565/syndicationfeed-contentencoded)可能對你有用。 – Kobynet 2014-09-30 07:20:13

回答

0

您可以使用Regex.Match顯示某些標籤內的內容。

your_content = Regex.Match(Item_with_your_content, @"<img\s+src='(.+)'\s+border='0'\s+/>").Groups[1].Value, 

此代碼將獲取標籤的Feed。更改爲您想要的標籤。