views:

198

answers:

3

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"&gt;
<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&amp;utm_medium=cpc&amp;utm_campaign=rss&lt;/link&gt; 
<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&lt;/url&gt; 
<title>FlightStats - Lisboa Airport Departures</title> 
<link>http://www.flightstats.com?utm_source=49e3481552e7c4c9:4e080df5:1281bf8969d:60e0&amp;utm_medium=cpc&amp;utm_campaign=rss&lt;/link&gt; 
</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>
A: 

http://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

minus4
A: 

The problem is that this feed is not in the "standard" format specially the

<fh:FlightHistory> </fh:FlightHistory> 

block. How can I parse it?

A: 

you need to use their namespace

JP Hellemons