Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/272.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WP解析外壳url_C#_Windows Phone 8_Visual Studio 2013_Rss - Fatal编程技术网

C# WP解析外壳url

C# WP解析外壳url,c#,windows-phone-8,visual-studio-2013,rss,C#,Windows Phone 8,Visual Studio 2013,Rss,我最近使用windows app studio online制作了一个应用程序,令人惊讶的是,这个应用程序处理rss提要非常好。我对应用程序做了一些更改,因为提要包含一个附件url,这是一个下载链接。我无法让它检测附件url。我想我只是表达错了 我尝试了每一个在线rss源代码查看器,看看它在yahoo管道中是否有任何不同,它显示为item.enclosure.url,在代码美女中显示为item.enclosure.urlhttp://bla.com/>我尝试了我能想到的每一种组合 我还尝试通过y

我最近使用windows app studio online制作了一个应用程序,令人惊讶的是,这个应用程序处理rss提要非常好。我对应用程序做了一些更改,因为提要包含一个附件url,这是一个下载链接。我无法让它检测附件url。我想我只是表达错了

我尝试了每一个在线rss源代码查看器,看看它在yahoo管道中是否有任何不同,它显示为item.enclosure.url,在代码美女中显示为item.enclosure.urlhttp://bla.com/>我尝试了我能想到的每一种组合

我还尝试通过yahoo管道给我一个新的提要,在新的标签中包含附件url ,并使用了代码

rssItem.FeedUrl = item.GetSafeElementString("downloadlink")
整个应用程序都正常工作,所以我知道我唯一做错的事情是重新设置附件url。yahoo pipes的唯一问题是你不能更改输入url,我需要更改输入url,所以它必须来自附件url

所以我的问题是如何检索标签

rssItem.FeedUrl = item.GetSafeElementString("whatgoeshere")
谢谢

这很有效

        XElement element = item.Element("enclosure"); //new element

        int length = (int)element.Attribute("length"); //seprate attributes
        string type = (string)element.Attribute("type");
        string url = (string)element.Attribute("url");

        rssItem.FeedUrl = url; // use the result