我通过这个网站和谷歌进行了搜索,并没有真正找到类似的东西......因为我遇到的大多数例子都是更正常、更干净的标准?我只需要弄清楚如何阅读 Name=、Handle= 和 Tweet=。谢谢你的帮助
到目前为止,我所拥有的是:
doc = XDocument.Load("twitterTrio.xml");
var temp = doc.Descendants("tweets")....
我正在尝试阅读的xml:
<?xml version="1.0" encoding="utf-8"?>
<dtvTwitter>
<tweets>
<RcsTweet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="NFL on ESPN" Handle="@ESPNNFL" Tweet="So @RGIII can pass, run and now he can BEAT BOX?? (MUST SEE VIDEO) --> http://t.co/sexsrtskfZ" ImageUrl="http://a0.twimg.com/profile_images/3573179175/26a4fd77256691aedab2ecbc60c7b86c_normal.jpeg" />
<RcsTweet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="NFL Retweet" Handle="@NFLRT" Tweet="RT @NOTSportsCenter: BREAKING: There's a reason #Jets coach Rex Ryan keeps naming Mark Sanchez starter: he's blind. http://t.co/zEPKqfAV1o" ImageUrl="http://a0.twimg.com/profile_images/378800000203929393/ef2529f3f226d69c0731c7469f1c51ba_normal.jpeg" />
<RcsTweet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="ProFootballTalk" Handle="@ProFootballTalk" Tweet="Bernard Pollard says Justin Hunter can destroy a defense, be a star and help the Titans win a championship http://t.co/GPJcJXXqvg" ImageUrl="http://a0.twimg.com/profile_images/2390753568/qzhbfg9lgfrkmkrt4l4u_normal.jpeg" />
</tweets>
</dtvTwitter>