rss

PHP errors parsing XML (RSS feed)

五迷三道 提交于 2019-12-06 04:13:35
问题 I'm using a PHP class based on the one found in this answer to parse five RSS feeds. Four of the five work without any troubles, but one of them is giving me some errors. Is it mal-formed XML or some other problem? I don't have control over the source of the RSS feed, but hope to notify the owner if the problem is theirs. Thanks in advance. PHP Errors: Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 35: parser error : xmlParseEntityRef: no name in _rss.php on

Can JavaScript load XML data from a third-party domain?

旧城冷巷雨未停 提交于 2019-12-06 03:55:17
问题 Can JavaScript load an RSS XML feed from Yahoo? Is client-side JS allowed to access 3rd-party domains? 回答1: You can use the technique outlined in my blog post Unwritten guide to Yahoo Query Langauge You would query the XML data table with a yql statment like this: select * from xml where url="http://path/to/xml Then you would add a script tag to your html (can be done with document.createElement('script')) with a src http://query.yahooapis.com/v1/public/yql?q={your yql here}&format=json

How do you specify retrieving local news when using a Google News RSS URL?

核能气质少年 提交于 2019-12-06 03:25:02
问题 I am trying to build an RSS parser that users Google News RSS. I am able to retrieve news articles from the news URL just by targeting the following URL: https://news.google.com/news/section?output=rss However, on the google news page their is an option to retrieve news near your current location. This URL in the browser is: https://news.google.com/news/section?geo=detect_metro_area Just adding the output=rss query string parameter is not enough to return the local news in RSS format. Instead

atom feed xmlns attribute messes up AS3's XML-parsing?

余生颓废 提交于 2019-12-06 01:31:49
Wanna see something interesting? var xml:XML = XML(<feed><entry /><entry /><entry /></feed>); trace(xml.entry.length()) // returns 3 Makes sense, right? Now let's add this attribute... var xml:XML = XML(<feed xmlns="http://www.w3.org/2005/Atom"><entry /><entry /><entry /></feed>); trace(xml.entry.length()) // returns 0 Well that can't be right. Let's try it with a different attribute. var xml:XML = XML(<feed test="okay"><entry /><entry /><entry /></feed>); trace(xml.entry.length()) // returns 3 Anyone know what would cause this? I used atom as an example, but any 'xmlns' attribute on the root

How can I make an RSS feed from Youtube search using Google App Script?

只愿长相守 提交于 2019-12-05 22:36:13
Since Youtube shut down its RSS feeds for searches with it's newest version of the API, I've been trying to recreate them using Google App Script. Here's what I have so far (based off of this tutorial for converting a twitter widget to RSS): function getSearches(a){ try{ var rss,title,link; title="Youtube RSS Feed"; link="http://www.youtube.com"; var d=ScriptApp.getService().getUrl()+"?"+a; rss='<?xml version="1.0"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">'; rss+='<channel><title>'+title+'</title>'; rss+='<link>'+link+'</link>'; rss+='<atom:link href="'+d+'" rel="self" type

How to make the Mercurial (hgwebdir) rss/atom feed display the branch name

纵饮孤独 提交于 2019-12-05 18:27:48
I would like to configure our Mercurial server installation so the rss/atom feed will publish the branch name of the changeset, in addition to the standard fields (title, guid, description, author, pubDate). Installation locations differ, but on ubuntu you'll find the relevant file as /usr/share/mercurial/templates/atom/changelogentry.tmpl . It starts out looking like: <entry> <title>{desc|strip|firstline|strip|escape|nonempty}</title> <id>{urlbase}{url}#changeset-{node}</id> <link href="{urlbase}{url}rev/{node|short}"/> <author> <name>{author|person|escape}</name> <email>{author|email

How to Add CSS Reference to .NET SyndicationFeed?

喜欢而已 提交于 2019-12-05 17:53:22
I have created a simple SyndicationFeed with many SyndicationItems. Each SyndicationItem has HtmlContent. The HtmlContent is a table. This displays OK, but now I need a minimum of styling/padding on the table. I believe I need to add a stylesheet reference like <?xml-stylesheet type="text/css" href="http://you.com/rss.css" ?> But I do not see how to do this with the .NET 4.5 SyndicationFeed or Atom10FeedFormatter classes. Here is the (pseudo) code that is generated by a WCF service. var feed = new feed(......); var xqn = new XmlQualifiedName( "mysys" , "http://www.w3.org/2000/xmlns/" ); feed

How To Call Medium RSS Feed

邮差的信 提交于 2019-12-05 17:47:44
Medium has an RSS feed available at https://medium.com/feed/[@username] . I'm trying to fetch all my blog posts using an XMLHTTPRequest. When I test on local, I run into CORs errors. When I turn on CORs Chrome extension, I get a 401 error. Any ideas? Has anyone succeeded in calling Medium RSS? To get https://medium.com/feed/[@username] content using XHR, you can make the XHR request through a proxy of some kind. For example, trying giving your current XHR code this URL: https://cors-anywhere.herokuapp.com/https://medium.com/feed/@sideshowbarker That’ll cause the request to go to https://cors

Reading iso-8859-1 rss feed C# WP7

谁都会走 提交于 2019-12-05 17:16:30
I'm trying to read a rss feed which uses the iso-8859-1 encoding. I can get all elements fine, the problem is when I put it in a textblock it will not show all characters. I'm not sure what i'm doing wrong. i've tried a few solutions I found on google but this didn't work for me. I must be missing something.. It's also the first time I really work with anything other than utf-16. I never had to convert anything before. The app works as follows I downloadstring async(WebClient). So when that is called I get a string containing the complete rss feed. I have tried getting the bytes, then encoding

Can't get pubDate to output in Yahoo! Pipes?

你离开我真会死。 提交于 2019-12-05 16:25:39
In one of my RSS feeds in Yahoo! Pipes, I'm formatting dates using the Date Formatter module and using the format %K so they are pubDate-compliant. In Pipe Output, my four dates appears as follows: Wed, 25 Jul 2012 03:30:00 +0000 , Mon, 16 Jul 2012 06:30:00 +0000 , Wed, 11 Jul 2012 07:00:00 +0000 , and Wed, 27 Jun 2012 13:00:00 +0000 . However, in the RSS feed output, none of these dates appear. Are they formatted incorrectly? Why does Yahoo! Pipes not output these dates? Okay, so I now realize that I need to output dates to y:published rather than pubDate . This doesn't seem to be widely