Partager via


SyndicationFeed.SaveAsRss20(XmlWriter) Méthode

Définition

Écrivez le flux de syndication dans le XmlWriter spécifié selon le 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)

Paramètres

writer
XmlWriter

XmlWriter dans lequel écrire.

Exemples

Le code suivant illustre l'écriture d'une instance de SyndicationFeed au format RSS 2.0.

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)

S’applique à