给定博客URL,获取其RSS源URL.我知道这个问题在这里被问到,但我正在寻找一个独立于框架的算法,但是我更喜欢C#中的代码.
我正在制作一个应用程序(iPhone应用程序),它从RSS源获取信息(笑话),然后填充tableView.现在,我是否会将RSS存储在一个数组中然后填充tableView,或者是什么?
我如何从RSS源接收信息?
谢谢!
我有一个我在ColdFusion 8中工作的RSS提要.我想要做的是解析整个RSS提要并提取趋势词.
我希望我的输出显示每个单词的使用次数.就像一个词云.
谢谢!麦克风
我正在尝试设置一个cron作业,定期将我的Facebook通知RSS提要加入,然后使用Prowl将最新的更改发送到我的iPhone作为推送消息.
我已经使用每日引用的RSS提要管理了相同的任务,但是我的Facebook RSS提要始终会将我重定向到"不兼容的Web浏览器". http://www.facebook.com/common/browser.php
$ curl -v http://www.facebook.com/feeds/notifications.php?....
* About to connect() to www.facebook.com port 80 (#0)
* Trying 69.63.181.11... connected
* Connected to www.facebook.com (69.63.181.11) port 80 (#0)
> GET /feeds/notifications.php?id=... HTTP/1.1
> User-Agent: curl/7.18.2 (x86_64-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10
> Host: www.facebook.com
> Accept: */*
>
< HTTP/1.1 302 Found
< Location: http://www.facebook.com/common/browser.php
< P3P: CP="DSP LAW"
Run Code Online (Sandbox Code Playgroud)
我需要添加到我的curl参数来欺骗Facebook,我认为只需要一个用户代理就需要更多?
这类似于我发布的一个问题,但我已经扩展了,因为这必须是可解决的.
我正在尝试从此RSS Feed访问评级和viewCount.现在,这些命名空间用yt:和gd: - 但是命名空间引用是来自youtube的feed的404,所以它似乎失败了.请帮忙吗?
我正在尝试使用: -
$ytFeed->children('http://gdata.youtube.com/schemas/2007')->statistics->attributes('viewCount'));
Run Code Online (Sandbox Code Playgroud)
但它失败了...它确实像通常那样工作,例如我可以访问媒体:用
$ytFeed->children('http://search.yahoo.com/mrss/')->group->category);
Run Code Online (Sandbox Code Playgroud)
这是原始RSS,请查看这些节点的底部: -
<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<id>http://gdata.youtube.com/feeds/api/videos/tDJFDsZFw2E</id>
<published>2009-03-02T07:02:49.000Z</published>
<updated>2011-07-19T06:57:29.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video' />
<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='Music' label='Music' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Other Lives' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Jesse Tabish' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Jenny Hsu' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Jupiter Hotel' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Portland' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='music' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='band' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='interview' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mf magazine' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='fashion' />
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='hotel …Run Code Online (Sandbox Code Playgroud) 在这个主题中搜索得到了部分答案:查看原始RSS提要?
但我尝试了他们的一些建议并且没有运气.我大部分时间都在使用Chrome,而我想要的只是能够在浏览器中查看格式化且易于阅读的原始RSS提要,因此我可以为我正在处理的项目进行一些解析.现在我看到了Feed,但它基本上是一个巨大的文本块,没有换行符,间距或突出显示.
一个解决方案似乎是Curl,但老实说,当我尝试安装它时,它有点过头了.如果有人能指出我的卷曲教程,这将使我明白用它做什么,我会很感激.我确实找到了一个部分解决方案,它是XmlSHell(http://www.softgauge.com/xmlshell/index.htm),但它不是理想的,因为它不在浏览器中.
有什么想法吗?
我正在尝试读取由wordpress生成的RSS,并激活全文.在firefox和IE9上,项数据包含以下元素content:encoded:
<content:encoded><![CDATA[bla bla bla]]></content:encoded>
Run Code Online (Sandbox Code Playgroud)
但是在C#程序中我请求相同的rss url这个节点不存在.我这样做我的C#请求:
WebClient client = new WebClient();
client.Encoding = Encoding.UTF8;
client.Headers.Add("Accept", "application/xml");
var xml = client.DownloadString(url)
Run Code Online (Sandbox Code Playgroud)
我是否必须在请求中添加标题才能拥有此特定字段?
目前,我使用以下代码生成xml和json数据:
public class App
{
public string app_name;
public string app_path;
public App(string m_app_name, string m_app_path)
{
app_name = m_app_name;
app_path = m_app_path;
}
public App() { }
}
[ScriptService]
public class Apps : WebService {
List<App> App = new List<App>();
SqlConnection connection;
SqlCommand command;
SqlDataReader reader;
[WebMethod()]
public List<App> GetUserApps()
{
var apps = new List<App>();
using (connection = new SqlConnection(ConfigurationManager.AppSettings["connString"]))
{
using (command = new SqlCommand(@"some query here", connection))
{
connection.Open();
using (reader = command.ExecuteReader())
{
int AppNameIndex …Run Code Online (Sandbox Code Playgroud) 我正在使用Node.js来构建我的RSS文件.我创建一个Date字符串,(new Date).toString()然后将该值用于<pubDate>RSS文件中的字段.但是,当我运行Feed验证程序时,它会报告这样的日期字符串无效:

我生成的示例日期字符串是:
Fri Oct 25 2013 17:59:42 GMT+0200 (Central European Daylight Time)
Run Code Online (Sandbox Code Playgroud)
如果我理解正确,为了验证,"Fri"之后应该有一个逗号,并且应该删除"GMT"和末尾的parens.有没有内置的方法来生成这样的兼容字符串与JavaScript或我是否必须编写自定义函数来执行此操作?
rss ×10
c# ×3
parsing ×2
xml ×2
asp.net-3.5 ×1
c#-3.0 ×1
cocoa-touch ×1
coldfusion ×1
curl ×1
date ×1
facebook ×1
iphone ×1
javascript ×1
json ×1
node.js ×1
php ×1
populate ×1
python ×1
simplexml ×1
twitter ×1
uitableview ×1
validation ×1
wordpress ×1
xml-parsing ×1