Redigera

Dela via


SyndicationItem.SaveAsAtom10(XmlWriter) Method

Definition

Write the syndication item to the specified XmlWriter in Atom 1.0 format.

public:
 void SaveAsAtom10(System::Xml::XmlWriter ^ writer);
public void SaveAsAtom10 (System.Xml.XmlWriter writer);
member this.SaveAsAtom10 : System.Xml.XmlWriter -> unit
Public Sub SaveAsAtom10 (writer As XmlWriter)

Parameters

writer
XmlWriter

The XmlWriter to write to.

Examples

The following code shows how to save a syndication item in Atom 1.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.SaveAsAtom10(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.SaveAsAtom10(writer)
writer.Close()

Applies to