SyndicationFeed.SaveAsRss20(XmlWriter) 方法

定义

以 RSS 2.0 格式将联合源写入指定的 XmlWriter

public:
 void SaveAsRss20(System::Xml::XmlWriter ^ writer);
public void SaveAsRss20 (System.Xml.XmlWriter writer);
member this.SaveAsRss20 : System.Xml.XmlWriter -> unit
Public Sub SaveAsRss20 (writer As XmlWriter)

参数

writer
XmlWriter

要向其中进行写入的 XmlWriter

示例

下面的代码演示如何以 RSS 2.0 格式写出 SyndicationFeed

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
// ...
XmlWriter xmlWriter = XmlWriter.Create("TestRSSFile.xml");
feed.SaveAsRss20(xmlWriter);
Dim feed As New SyndicationFeed("Feed Title", "Feed Description", New Uri("http:'Feed/Alternate/Link"), "FeedID", DateTime.Now)
' ...
Dim xmlWriter As XmlWriter = xmlWriter.Create("TestRSSFile.xml")
feed.SaveAsRss20(XmlWriter)

适用于