Atom10FeedFormatter.CanRead(XmlReader) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Verifies whether the specified XmlReader contains a valid Atom 1.0 syndication feed.
public:
override bool CanRead(System::Xml::XmlReader ^ reader);
public override bool CanRead (System.Xml.XmlReader reader);
override this.CanRead : System.Xml.XmlReader -> bool
Public Overrides Function CanRead (reader As XmlReader) As Boolean
Parameters
Returns
A value that specifies whether the XmlReader contains a valid Atom 1.0 syndication feed.
Examples
The following code shows how to use the CanRead(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
Remarks
This method does not advance the reader to beyond the start element.