次の方法で共有


Atom10ItemFormatter.WriteTo(XmlWriter) メソッド

定義

Atom10ItemFormatter に関連付けられたSyndicationItem を、指定された XmlWriter に書き込みます。

public:
 override void WriteTo(System::Xml::XmlWriter ^ writer);
public override void WriteTo (System.Xml.XmlWriter writer);
override this.WriteTo : System.Xml.XmlWriter -> unit
Public Overrides Sub WriteTo (writer As XmlWriter)

パラメーター

writer
XmlWriter

書き込み先の XmlWriter

WriteTo メソッドを呼び出す方法を次のコード例に示します。

SyndicationItem item = new SyndicationItem("Test Item", "This is the content for Test Item", new Uri("http://localhost/ItemOne"), "TestItemID", DateTime.Now);

Atom10ItemFormatter atomItemFormatter = new Atom10ItemFormatter(item);
XmlWriter atomWriter = XmlWriter.Create("Atom.xml");
atomItemFormatter.WriteTo(atomWriter);
atomWriter.Close();
Dim item As New SyndicationItem("Test Item", "This is the content for Test Item", New Uri("http://localhost/ItemOne"), "TestItemID", DateTime.Now)

Dim atomItemFormatter As New Atom10ItemFormatter(item)
Dim atomWriter As XmlWriter = XmlWriter.Create("Atom.xml")
atomItemFormatter.WriteTo(atomWriter)
atomWriter.Close()

適用対象