共用方式為


SyndicationItem.SaveAsAtom10(XmlWriter) 方法

定義

以 Atom 1.0 格式將新聞訂閱項目寫入指定的 XmlWriter

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)

參數

writer
XmlWriter

要寫入的目標 XmlWriter

範例

下列程式碼會示範如何將 Atom 1.0 格式的新聞訂閱項目儲存至指定的 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.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()

適用於