ОК, я создаю твиттер-приложение для Windows Phone, и по какой-то причине я не могу разобрать эти данные. Я просто пытаюсь разобрать один статус ...
Вот данные XML из твиттера ...
<status>
<created_at>Sat Sep 10 17:59:12 +0000 2011</created_at>
<id>112585933307645952</id>
<text>AP: Start 'em/Sit 'em Week 1 - Arrowhead Pride (blog): Midwest Sports FansAP: Start 'em/Sit 'em Week 1Arrowhead ... http://t.co/rWnx5pe</text>
<source><a href="http://twitterfeed.com" rel="nofollow">twitterfeed</a></source>
<truncated>false</truncated>
<favorited>false</favorited>
<in_reply_to_status_id></in_reply_to_status_id>
<in_reply_to_user_id></in_reply_to_user_id>
<in_reply_to_screen_name></in_reply_to_screen_name>
<retweet_count>0</retweet_count>
<retweeted>false</retweeted>
<user>
<id>27680614</id>
<name>Fantasy Football</name>
<screen_name>hackhype</screen_name>
<location>Atlanta, GA</location>
<description>NFL News and Fantasy Perspective!</description>
<profile_image_url>http://a1.twimg.com/profile_images/509176461/icon_normal.gif</profile_image_url>
<profile_image_url_https>https://si0.twimg.com/profile_images/509176461/icon_normal.gif</profile_image_url_https>
<url>http://www.facebook.com/hackhype</url>
<protected>false</protected>
<followers_count>29888</followers_count>
<profile_background_color>ebebeb</profile_background_color>
<profile_text_color>333333</profile_text_color>
<profile_link_color>0084B4</profile_link_color>
<profile_sidebar_fill_color>ebebeb</profile_sidebar_fill_color>
<profile_sidebar_border_color>040470</profile_sidebar_border_color>
<friends_count>6789</friends_count>
<created_at>Mon Mar 30 17:01:37 +0000 2009</created_at>
<favourites_count>1</favourites_count>
<utc_offset>-18000</utc_offset>
<time_zone>Quito</time_zone>
<profile_background_image_url>http://a2.twimg.com/profile_background_images/44228452/twitterbackground.jpg</profile_background_image_url>
<profile_background_image_url_https>https://si0.twimg.com/profile_background_images/44228452/twitterbackground.jpg</profile_background_image_url_https>
<profile_background_tile>false</profile_background_tile>
<profile_use_background_image>true</profile_use_background_image>
<notifications>false</notifications>
<geo_enabled>false</geo_enabled>
<verified>false</verified>
<following>true</following>
<statuses_count>10219</statuses_count>
<lang>en</lang>
<contributors_enabled>false</contributors_enabled>
<follow_request_sent>false</follow_request_sent>
<listed_count>466</listed_count>
<show_all_inline_media>false</show_all_inline_media>
<default_profile>false</default_profile>
<default_profile_image>false</default_profile_image>
<is_translator>false</is_translator>
</user>
<geo />
<coordinates />
<place />
<possibly_sensitive>false</possibly_sensitive>
<contributors />
<entities>
<user_mentions />
<urls>
<url end="135" start="116">
<url>http://t.co/rWnx5pe</url>
<display_url>bit.ly/ookpnp</display_url>
<expanded_url>http://bit.ly/ookpnp</expanded_url>
</url>
</urls>
<hashtags />
</entities>
</status>
Вот код, который я использую для его анализа (он не работает). Он компилируется и работает, но thisTweet возвращается как ноль ....
XElement xmlData = XElement.Parse(e.Result);
thisTweet = (from tweet in xmlData.Descendants("status")
select new Tweet
{
created_at = tweet.Element("created_at").Value,
text = tweet.Element("text").Value,
//user info
name = tweet.Element("user").Element("name").Value,
profile_image_url = tweet.Element("user").Element("profile_image_url").Value,
screen_name = tweet.Element("user").Element("screen_name").Value,
user_id = tweet.Element("user").Element("id").Value
}).First<Tweet>();
DataContext = thisTweet;