Rss20FeedFormatter.ReadFrom(XmlReader) Método

Definição

Lê um feed de sindicalização RSS 2.0 da instância de XmlReader especificada.Reads an RSS 2.0 syndication feed from the specified XmlReader instance.

public:
 override void ReadFrom(System::Xml::XmlReader ^ reader);
public override void ReadFrom (System.Xml.XmlReader reader);
override this.ReadFrom : System.Xml.XmlReader -> unit
Public Overrides Sub ReadFrom (reader As XmlReader)

Parâmetros

reader
XmlReader

O XmlReader para leitura.The XmlReader to read from.

Exemplos

O código a seguir mostra como usar o método ReadFrom(XmlReader).The following code shows how to use the ReadFrom(XmlReader) method.

Rss20FeedFormatter feedFormatter = new Rss20FeedFormatter();
XmlReader rssReader = XmlReader.Create("http://Contoso/Feeds/MyFeed");
if (feedFormatter.CanRead(rssReader))
{
    feedFormatter.ReadFrom(rssReader);
    rssReader.Close();
}
Dim feedFormatter As New Rss20FeedFormatter()
Dim rssReader As XmlReader = XmlReader.Create("http://Contoso/Feeds/MyFeed")
If feedFormatter.CanRead(rssReader) Then
    feedFormatter.ReadFrom(rssReader)
    rssReader.Close()
End If

Aplica-se a