rss

rss parsing DOMDocument in PHP

旧时模样 提交于 2019-12-24 19:15:27
问题 I'm trying to get all categories and push them into my array , so far I'm doing it this way: $doc = new DOMDocument(); $doc->load('myxml.xml'); $arr = array(); foreach ($doc->getElementsByTagName('item') as $node) { $items = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('category')->item(0)->nodeValue ); $arr [] = $items ; } This works if we have only 1 cat, however, my xml has several categories per item. What would be a

How to embed link tag in textview using RSS in a Android

99封情书 提交于 2019-12-24 17:17:01
问题 I had made a basic rss reader that reads the feed and display it in listview, then i further tried to improve it by adding tabs and writing a custom adapter,now the next step i want to achieve is to provide the basic capability that whenever a headline (displayed through a textview) is clicked/touched the link associated with it (link has been extracted throught he rss/xml) is launched in the browser. Now, i know that launching the link into browser is an easy one step affair using URI, whats

Storing XML in a Database for Flexible Content

倖福魔咒の 提交于 2019-12-24 17:06:48
问题 I'm working on building a system that aggregates content from several different RSS feeds and API's, stores it, and then outputs it with unique formatting based on the source of the content. My current plan is to create an XML structure for each unique type, storing each record using that structure in a MySQL database, and then retrieving it and parsing it appropriately for display. Are there any significant issues to using this approach, or are there better ways to achieve the same goal? 回答1

Rss Feeds reader gives blank screen for .xml link

白昼怎懂夜的黑 提交于 2019-12-24 15:24:15
问题 I am following this tutorial (http://techiedreams.com/android-rss-reader-part-two-offline-reading-swipe-through-detail-views/)and try to implement rss feed reader It working properly when I use String RSSFEEDURL = "http://feeds.feedburner.com/androidcentral?format=xml"; instead of using String RSSFEEDURL = "http://www.livescience.com/home/feed/health.xml"; This is my splash activity package com.healthyhub.nadeesha.rsssave; import android.app.Activity; import android.app.AlertDialog; import

Why am I sometimes downloading garbage data from BBC Weather RSS feeds?

邮差的信 提交于 2019-12-24 15:14:21
问题 I'm getting weird corrupted looking text / data on random occasions when downloading from the BBC's RSS weather feed. Strangely, this happens if I directly load from the web rather than download as well. Could it be a memory problem? It is so random, but 70% of the time, one of the locations will be downloaded wrong. Downloading Subs: Public Sub DownloadWeather() If IsConnectionAvailable() = True Then Module_XML_Download.DownloadXML("http://open.live.bbc.co.uk/weather/feeds/en/2657832

Why isn't XMLFeedSpider failing to iterate through the designated nodes?

偶尔善良 提交于 2019-12-24 13:40:27
问题 I'm trying to parse through PLoS's RSS feed to pick up new publications. The RSS feed is located here. Below is my spider: from scrapy.contrib.spiders import XMLFeedSpider class PLoSSpider(XMLFeedSpider): name = "plos" itertag = 'entry' allowed_domains = ["plosone.org"] start_urls = [ ('http://www.plosone.org/article/feed/search' '?unformattedQuery=*%3A*&sort=Date%2C+newest+first') ] def parse_node(self, response, node): pass This configuration produces the following log output (note the

Android - Add an item from one ListView to another ListView?

浪子不回头ぞ 提交于 2019-12-24 13:26:29
问题 I have an app that shows news from a RSS feed. There is ListView-1 which loads the news and when you click on an item(news), it shows only the selected news in a seperated xml layout. On the ActionBar for the single news item layout, user can click on Add to Favourites. I have another activity and layout file and a listview just for Favourites. How can I copy an item from one listview to another? So, the user can add news from main ListView-1 to another list called ListView-2. I cannot use

Should I output cache my control that looks up twitter RSS onload?

ε祈祈猫儿з 提交于 2019-12-24 12:28:26
问题 I have a user control that is featured on several pages of a heavily hit site. Some of these pages include our blog sidebar, our forum sidebar, and smack right in the middle of our home page. That means this control is rendered a lot. The control it meant to read in a twitter RSS feed for a specific account and write out the last 2 tweets. Below is the majority of my Page_Load for the control. I have it in a try {} catch because it seems that on production the site is unable to load the XML

SAX Parser doesn't recognize windows-1255 encoding

孤街醉人 提交于 2019-12-24 10:55:54
问题 I'm working on a rss parser in android (upgrading a parser I found on the internet). From what I know SAX Parser recognize the encoding automatically from the xml tag, but when I try to parse a feed that declare windows-1255 encoding it doesn't parsing it and throws and exception. I tried few things: final InputSource source = new InputSource(feed); Reader isr = new InputStreamReader(feed); source.setCharacterStream(isr); I even tried telling him the specific encoding. source.setEncoding(

RSS feed: to feed images to your rss

丶灬走出姿态 提交于 2019-12-24 10:07:59
问题 I have searched around online about feed images to your rss feed. it seems not very popular. is it correct to use to feed images? for instance, <enclosure url="http://images.productserve.com/thumb/547/680654.jpg" type="image/jpeg" length="3241"/> what is the length in the enclosure elementy? 回答1: The enclosure tag is pretty popular for things like podcasts (so, audio files) but I haven't seen it used for images often. length describes the file size in bytes, so it's up to you to pragmatically