SyndicationItem.SaveAsRss20 Method (XmlWriter)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Write the syndication item to the specified XmlWriter in RSS 2.0 format.

Namespace:   System.ServiceModel.Syndication
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public void SaveAsRss20(
	XmlWriter writer
)

Parameters

writer
Type: System.Xml.XmlWriter

The XmlWriter to write to.

The following code shows how to save a syndication item in RSS 2.0 format to the specified XML writer.

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

.NET Framework
Available since 3.5
Silverlight
Available since 2.0
Return to top
Show: