SyndicationItem.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 SyndicationItem instance from the specified XmlReader. |
Load<TSyndicationItem>(XmlReader) |
Loads a SyndicationItem derived object from the specified XmlReader. |
Load(XmlReader)
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
Loads a SyndicationItem instance from the specified XmlReader.
public:
static System::ServiceModel::Syndication::SyndicationItem ^ Load(System::Xml::XmlReader ^ reader);
public static System.ServiceModel.Syndication.SyndicationItem Load (System.Xml.XmlReader reader);
static member Load : System.Xml.XmlReader -> System.ServiceModel.Syndication.SyndicationItem
Public Shared Function Load (reader As XmlReader) As SyndicationItem
Parameters
Returns
A SyndicationItem instance.
Exceptions
Invalid XML encountered during read.
Examples
The following example shows how to load a syndication item into a SyndicationItem instance.
XmlReader reader = XmlReader.Create("http://localhost/items/serializedItem.xml");
SyndicationItem item = SyndicationItem.Load(reader);
reader.Close();
Dim reader As XmlReader = XmlReader.Create("http:' localhost/items/serializedItem.xml")
Dim item As SyndicationItem = SyndicationItem.Load(reader)
reader.Close()
Applies to
Load<TSyndicationItem>(XmlReader)
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
- Source:
- SyndicationItem.cs
Loads a SyndicationItem derived object from the specified XmlReader.
public:
generic <typename TSyndicationItem>
where TSyndicationItem : System::ServiceModel::Syndication::SyndicationItemgcnew() static TSyndicationItem Load(System::Xml::XmlReader ^ reader);
public static TSyndicationItem Load<TSyndicationItem> (System.Xml.XmlReader reader) where TSyndicationItem : System.ServiceModel.Syndication.SyndicationItem, new();
static member Load : System.Xml.XmlReader -> 'SyndicationItem (requires 'SyndicationItem :> System.ServiceModel.Syndication.SyndicationItem and 'SyndicationItem : (new : unit -> 'SyndicationItem))
Public Shared Function Load(Of TSyndicationItem As {SyndicationItemNew}) (reader As XmlReader) As TSyndicationItem
Type Parameters
- TSyndicationItem
The SyndicationItem-derived class to load.
Parameters
Returns
A SyndicationItem derived object that contains the syndication item.
Examples
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();
Dim reader = XmlReader.Create("http:' localhost/items/serializedItem.xml")
Dim myItem As MySyndicationItem = SyndicationItem.Load(Of MySyndicationItem)(reader)
reader.Close()
Remarks
Use this method when you are loading a syndication item into a class derived from SyndicationItem.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기