Sdílet prostřednictvím


SyndicationItem.SaveAsRss20(XmlWriter) Metoda

Definice

Napište položku syndikace do zadaného XmlWriter formátu 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)

Parametry

writer
XmlWriter

Do XmlWriter které se má zapisovat.

Příklady

Následující kód ukazuje, jak uložit syndikační položku ve formátu RSS 2.0 do zadaného zapisovače 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()

Platí pro