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

适用于