[英]How to get selected items from the rss file?
Example code: 示例代码:
<rss version="2.0">
<channel>
<item>
<title>Title /title>
<link>Link</link>
<description>Desc</description>
</item>
<item>
<title>Title</title>
<link>Link</link>
<description>Desc</description>
</item>
</channel>
</rss>
I get data from link: 我从链接获取数据:
XElement rss = XElement.Load("http://examplelink.com/file.rss");
and i want to save it but without any other elements, only title and link: 我想保存它,但没有其他任何元素,只有标题和链接:
rss.Save(@"C:\doc.txt");
How to do that? 怎么做?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.