rss

How to find the given string is a RSS feed or not

丶灬走出姿态 提交于 2019-12-25 07:31:20
问题 I have a string which takes both XML and HTML input from a data downloaded from the given Url. I want to check whether the downloaded string is an rss feed of a html document before parsing through SAXParser. How to find this? For example If I download a data from http://rss.cnn.com/rss/edition.rss the resulting string is a rss feed If I download a data from http://edition.cnn.com/2014/06/19/opinion/iraq-neocons-wearing/index.html the resulting string is a html document. I want to continue my

How to select tags with namespaces in CasperJS?

烈酒焚心 提交于 2019-12-25 06:47:30
问题 I'm refactoring a RSS so I decided to write some tests with CasperJS. One of the elements of the RSS is "atom:link" (") I tried this three codes, but none works test.assertExists("//atom:link", "atom:link tag exists."); test.assertExists({ type: 'xpath', path: "//atom:link" }, "atom:link element exists."); //even this... test.assertExists({ type: 'xpath', namespace: "xmlns:atom", path: "//atom:link" }, "atom:link element exists."); The RSS code is: <?xml version="1.0" encoding="utf-8" ?> <rss

SimplePie and get_item_tags attribute

隐身守侯 提交于 2019-12-25 06:39:33
问题 I'm using Simplepie to parse different RSS feeds, passing them to a Smarty template, and I need to return the attribute from each item line that in this example reads: NEWSX <source url="http://whatever.url/"><![CDATA[NEWSX]]></source> I have found the get_item_tags method will select the line and attribute having used the following: $newssource = $item->get_item_tags('','source'); Here is my problem. I don't know how to attach each source to an item when using the following code (so that

Error when Parsing RSS

試著忘記壹切 提交于 2019-12-25 05:21:45
问题 I 'm trying to parse RSS feeds and then display them on my website. My code seems to work correctly when parsing techcrunch & arstechnica RSS. But when I try to parse HackerNews RSS I get the an error. XmlReader readXML; readXML = XmlReader.Create(GetURL()); SyndicationFeed News= SyndicationFeed.Load(readXML); readXML.Close(); return News; I get the following error on readXML = XmlReader.Create(GetURL()); geturl is the url for rss. The server committed a protocol violation. Section

Error when Parsing RSS

戏子无情 提交于 2019-12-25 05:21:17
问题 I 'm trying to parse RSS feeds and then display them on my website. My code seems to work correctly when parsing techcrunch & arstechnica RSS. But when I try to parse HackerNews RSS I get the an error. XmlReader readXML; readXML = XmlReader.Create(GetURL()); SyndicationFeed News= SyndicationFeed.Load(readXML); readXML.Close(); return News; I get the following error on readXML = XmlReader.Create(GetURL()); geturl is the url for rss. The server committed a protocol violation. Section

Offset Handling in jquery.rss

泄露秘密 提交于 2019-12-25 04:37:12
问题 I want to include a RSS-feed on my website, where I load 5 entries at first and later load more as the user scrolls down the page (due to page response times). I am using jquery.rss (https://github.com/sdepold/jquery-rss) for the RSS-feed and waypoints to fire the RSS reload when the user reached the page end (http://imakewebthings.com/waypoints/). I thought I could just use jquery.rss offset (limit:5, offsetStart: 5) to load entry 5-10 for example but I seem to not use it correctly. $("#rss

Inserting into HTML5 database with jQuery loop

自闭症网瘾萝莉.ら 提交于 2019-12-25 04:19:22
问题 Javascript is not my forte, so excuse me if this is incredibly obvious. I'm working on some code that creates a local database and table, retrieves an RSS feed, parses it, and adds information from each entry to the database. $.ajax({ type: "GET", url: feedurl, dataType: "xml", success: parseXml }); function parseXml(xml){ $(xml).find("item").each(function(){ title = $(this).find("title").text(); description = $(this).find("description").text(); postype = $(this).find("postype").text();

Does joomla store article/ modules text and image path in database?

元气小坏坏 提交于 2019-12-25 03:49:49
问题 I wanted to create an iPhone app for a website which is created using Joomla 2.5. What I was thinking is to create RSS and pass that link in the iPhone app. However, for creating RSS, I was worried about from where should I get the articles text and images that are there? Hence, I wanted to know: does Joomla store the article/ modules text and images path in a database? If yes, which table does it use to store all info? 回答1: Of course it's stored in the database ;-) You should find all the

XSLT RSS FEED - Combine substring-before and substring-after

十年热恋 提交于 2019-12-25 03:49:14
问题 My apologies in advance if this question is really simple, but I can’t seem to find a way around this issue. I need a way to combine the substring-before and substring-after function in xsl so I have a start and end point within a description element of an RSS feed. In each description tag I want to extract everything from ‘Primary Title’ onwards, but stop as soon as it reaches the first <b> tag. I tried the following xsl without much success <?xml version="1.0" ?> <xsl:stylesheet version="1

DOM4j doesn't work on Android

梦想与她 提交于 2019-12-25 03:13:06
问题 I try to use DOM4j to phase a XML RSS feed on Android. I do add the dom4j.jar to lib\ and the user permission. <uses-permission android:name="android.permission.INTERNET"/> I also compile this source code in pure Java project, and it works! I'm confused if there is any restrictions on Android(if yes, what methods can I use), or only I made some mistakes. Parts of Logcat: 03-15 23:27:10.611: W/System.err(10453): org.dom4j.DocumentException: Couldn't open http://tw.news.yahoo.com/rss/ Nested