Modifier

Partager via


Atom10FeedFormatter.ReadFrom(XmlReader) Method

Definition

Reads an Atom 1.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)

Parameters

reader
XmlReader

The XmlReader to read from.

Examples

The following code shows how to use the ReadFrom(XmlReader) method.

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

Applies to