Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

SyndicationFeed.Load Method

Definition

Namespace:
System.ServiceModel.Syndication
Assemblies:
System.ServiceModel.dll, System.ServiceModel.Syndication.dll
Assembly:
System.ServiceModel.Web.dll
Assemblies:
System.ServiceModel.dll, System.ServiceModel.Web.dll
Assembly:
System.ServiceModel.Syndication.dll
Packages:
System.ServiceModel.Primitives v10.0.652802, System.ServiceModel.Syndication v11.0.0-preview.5.26302.115
Package:
System.ServiceModel.Syndication v11.0.0-preview.5.26302.115

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.

Overloads

Name Description
Load(XmlReader)

Loads a syndication feed from the specified XML reader.

Load<TSyndicationFeed>(XmlReader)

Loads a SyndicationFeed-derived instance from the specified XmlReader.

Load(XmlReader)

Source:
SyndicationFeed.cs
Source:
SyndicationFeed.cs
Source:
SyndicationFeed.cs
Source:
SyndicationFeed.cs

Loads a syndication feed from the specified XML reader.

public:
 static System::ServiceModel::Syndication::SyndicationFeed ^ Load(System::Xml::XmlReader ^ reader);
public static System.ServiceModel.Syndication.SyndicationFeed Load(System.Xml.XmlReader reader);
static member Load : System.Xml.XmlReader -> System.ServiceModel.Syndication.SyndicationFeed
Public Shared Function Load (reader As XmlReader) As SyndicationFeed

Parameters

reader
XmlReader

The XmlReader to load the feed from.

Returns

A SyndicationFeed that contains the loaded contents.

Examples

The following example demonstrates how to call this method.

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

Applies to

Load<TSyndicationFeed>(XmlReader)

Source:
SyndicationFeed.cs
Source:
SyndicationFeed.cs
Source:
SyndicationFeed.cs
Source:
SyndicationFeed.cs

Loads a SyndicationFeed-derived instance from the specified XmlReader.

public:
generic <typename TSyndicationFeed>
 where TSyndicationFeed : System::ServiceModel::Syndication::SyndicationFeedgcnew() static TSyndicationFeed Load(System::Xml::XmlReader ^ reader);
public static TSyndicationFeed Load<TSyndicationFeed>(System.Xml.XmlReader reader) where TSyndicationFeed : System.ServiceModel.Syndication.SyndicationFeed, new();
static member Load : System.Xml.XmlReader -> 'SyndicationFeed (requires 'SyndicationFeed :> System.ServiceModel.Syndication.SyndicationFeed and 'SyndicationFeed : (new : unit -> 'SyndicationFeed))
Public Shared Function Load(Of TSyndicationFeed As {SyndicationFeedNew}) (reader As XmlReader) As TSyndicationFeed

Type Parameters

TSyndicationFeed

The syndication feed type.

Parameters

reader
XmlReader

The XmlReader to read from.

Returns

TSyndicationFeed

A SyndicationFeed-derived instance that contains the feed.

Exceptions

Invalid XML encountered during read.

Examples

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);
Dim reader As XmlReader = XmlReader.Create("http:'localhost/feeds/serializedFeed.xml")
Dim feed As SyndicationFeed = SyndicationFeed.Load(reader)

Remarks

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

Applies to


Feedback

Was this page helpful?