开发者

Parse SyndicationItem to c# class

What's the best way to parse the folowing rss Syndication Item into a c# class:

<rss version="2.0" xmlns:fh="http://rss.flightstats.com/ns/rss/1.0">
<channel>
<title>FlightStats - Lisboa Airport Departures</title> 
<language>en-us</language> 
<copyright>Copyright (c) 2007 Conducive Technology Inc. All rights reserved.</copyright> 
<description>FlightStats is your source for airport and flight information</description> 
<link>http://www.flightstats.com?utm_source=49e3481552e7c4c9:4e080df5:1281bf8969d:60e0&utm_medium=cpc&utm_campaign=rss</link> 
<pubDate>Sun, 25 Apr 2010 12:30:14 +0000</pubDate> 
<lastBuildDate>Sun, 25 Apr 2010 12:30:14 +0000</lastBuildDate> 
<ttl>15</ttl> 
<image>
<url>http://dem5xqcn61lj8.cloudfront.net/Widgets/images/flightstats_logo_widget.gif</url> 
<title>FlightStats - Lisboa Airport Departures</title> 
<link>http://www.flightstats.com?utm_source=49e3481552e7c4c9:4e080df5:1281bf8969d:60e0&utm_medium=cpc&utm_campaign=rss</link> 
</image>
<item>
<fh:FlightHistory FlightHistoryId="190011545" DepartureDate="2010-04-25 12:00"        ArrivalDate="2010-04-25 14:45" PublishedDepartureDate="2010-04-25 12:00"  开发者_开发问答      PublishedArrivalDate="2010-04-25 14:45" ScheduledGateDepartureDate="2010-04-25 12:00" ScheduledGateArrivalDate="2010-04-25 14:45" EstimatedGateArrivalDate="2010-04-25 14:40"       ActualRunwayDepartureDate="2010-04-25 12:13" FlightNumber="8461" StatusCode="A" Status="Active" CreatorCode="O" ScheduledBlockTime="105" DepartureAirportTimeZoneOffset="1"     ArrivalAirportTimeZoneOffset="2" ScheduledAircraftType="320" DepartureTerminal="T1" ArrivalTerminal="1" TrackingEnabled="False"> 
<fh:Airline AirlineCode="VY" Name="Vueling Airlines" /> 
<fh:Origin AirportCode="LIS" Name="Lisboa Airport" City="Lisbon" CountryCode="PT" /> 
<fh:Destination AirportCode="BCN" Name="Barcelona Airport" City="Barcelona" StateCode="SP" CountryCode="ES" /> 
</fh:FlightHistory>
<guid isPermaLink="false">VY8461LISBCN</guid> 
<title>VY 8461 LIS-BCN Departed</title> 
<description>
teste
</description>
<link>http://www.flightstats.com/go/FlightStatus/flightStatusByFlight.do?     id=190011545&utm_source=49e3481552e7c4c9:4e080df5:1281bf8969d:60e0&utm_medium=cpc&utm_campaign=rss</link> 
</item>
</channel>
</rss>


https://web.archive.org/web/20211029043745/https://www.4guysfromrolla.com/articles/031903-1.aspx

is one example there is others available just type asp.net parse or read rss in your favorite search engine

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜