SyndicationItem.GetAtom10Formatter Method

Definition

Gets an Atom10FeedFormatter instance.

public:
 System::ServiceModel::Syndication::Atom10ItemFormatter ^ GetAtom10Formatter();
public System.ServiceModel.Syndication.Atom10ItemFormatter GetAtom10Formatter ();
member this.GetAtom10Formatter : unit -> System.ServiceModel.Syndication.Atom10ItemFormatter
Public Function GetAtom10Formatter () As Atom10ItemFormatter

Returns

A Atom10FeedFormatter instance.

Examples

The following code shows how to write a syndication item in Atom 1.0 format to an XML file.

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

Applies to