SyndicationItem.Load<TSyndicationItem> Method (XmlReader)

 

Loads a SyndicationItem derived object from the specified XmlReader.

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

public static TSyndicationItem Load<TSyndicationItem>(
	XmlReader reader
)
where TSyndicationItem : new(), SyndicationItem

Parameters

reader
Type: System.Xml.XmlReader

The XmlReader to read from.

Return Value

Type: TSyndicationItem

A SyndicationItem derived object that contains the syndication item.

Type Parameters

TSyndicationItem

The SyndicationItem-derived class to load.

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

The following code shows how to load a syndication item of the specified type from an XML reader.

XmlReader reader = XmlReader.Create("http://localhost/items/serializedItem.xml");
MySyndicationItem myItem = SyndicationItem.Load<MySyndicationItem>(reader);
reader.Close();

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