Bagikan melalui


SyndicationItem.SaveAsRss20(XmlWriter) Metode

Definisi

Tulis item sindikasi ke yang ditentukan XmlWriter dalam format RSS 2.0.

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)

Parameter

writer
XmlWriter

Untuk XmlWriter menulis ke.

Contoh

Kode berikut menunjukkan cara menyimpan item sindikasi dalam format RSS 2.0 ke penulis XML yang ditentukan.

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()

Berlaku untuk