SyndicationFeed.Load 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.
Overloads
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
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
Returns
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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기