SyndicationFeed content:encoded

后端 未结 1 1691
孤街浪徒
孤街浪徒 2020-12-31 17:23

I’m using the SyndicationFeed class to consume some rss feeds. I am wondering how to get the content:encoded node of an RSS feed. This is t

1条回答
  •  清酒与你
    2020-12-31 17:44

    Try this :

    StringBuilder sb = new StringBuilder();
    foreach (SyndicationElementExtension extension in item.ElementExtensions)
        {
             XElement ele = extension.GetObject();
             if (ele.Name.LocalName == "encoded" && ele.Name.Namespace.ToString().Contains("content"))
             {
                  sb.Append(ele.Value + "
    "); } }

    0 讨论(0)
提交回复
热议问题