SyndicationItem.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 格式的联合项保存到指定的 XML 读取器。

SyndicationItem item = new SyndicationItem("Item Title", "Item Content", new Uri("http://Item/Alternate/Link"), "itemID", DateTimeOffset.Now);
XmlWriter writer = XmlWriter.Create("outfile.xml");
item.SaveAsRss20(writer);
writer.Close();
Dim item As New SyndicationItem("Item Title", "Item Content", New Uri("http:' Item/Alternate/Link"), "itemID", DateTimeOffset.Now)
Dim writer As XmlWriter = XmlWriter.Create("outfile.xml")
item.SaveAsRss20(writer)
writer.Close()

适用于