SyndicationItem.GetAtom10Formatter Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene un'istanza Atom10FeedFormatter di .
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
Valori restituiti
Un'istanza Atom10FeedFormatter.
Esempio
Il codice seguente illustra come scrivere un elemento di diffusione in formato Atom 1.0 in un file XML.
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()