SyndicationFeed.Load<TSyndicationFeed> Method (XmlReader)

 

Loads a SyndicationFeed-derived instance from the specified XmlReader.

Namespace:   System.ServiceModel.Syndication
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public static TSyndicationFeed Load<TSyndicationFeed>(
	XmlReader reader
)
where TSyndicationFeed : new(), SyndicationFeed

Parameters

reader
Type: System.Xml.XmlReader

The XmlReader to read from.

Return Value

Type: TSyndicationFeed

A SyndicationFeed-derived instance that contains the feed.

Type Parameters

TSyndicationFeed

The syndication feed type.

Exception Condition
XmlException

Invalid XML encountered during read.

Use this method when you are loading a syndication item into a class derived from SyndicationFeed.

The following code shows how to load a syndication feed from an XmlReader instance.

XmlReader reader = XmlReader.Create("http://localhost/feeds/serializedFeed.xml");
SyndicationFeed feed = SyndicationFeed.Load(reader);

.NET Framework
Available since 3.5
Silverlight
Available since 2.0
Return to top
Show: