rss

Multiple channels in a single RSS xml - is it ever appropriate?

喜欢而已 提交于 2019-12-01 03:17:59
A typical xml file for an RSS feed starts with an "rss" element on the outermost level, and usually has a single "channel" element within it that represents the "feed" or "channel." Is there ever a situation where it is appropriate to use multiple channels within an element, like the following? <rss> <channel> ... <item> ... </item> </channel> <channel> ... </channel> </rss> From here : Subordinate to the <rss> element is a single <channel> element, which contains information about the channel (metadata) and its contents. So there not only is no use case for that – it isn't even allowed. 来源:

Simple Xml - Element Declared Twice Error

无人久伴 提交于 2019-12-01 02:44:15
问题 I have been trying to wrap a set of classes based on Simple XML (Java Serializer) around a RSS Feed. The sample feed is <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> <channel> <title>Coding Horror</title> <link>http://www.codinghorror.com/blog/</link> <description>programming and human factors - Jeff Atwood</description> <language>en-us</language> <lastBuildDate>Wed, 04 May 2011 20:34:18 -0700<

PHP Read XML Podcast RSS Feed

社会主义新天地 提交于 2019-12-01 01:52:26
OK, so, I'm creating a page for a friend's podcast site that lists out all of the episodes to his podcast(s). Essentially, all I'm looking for is how to read the RSS Feed. Parse out the Nodes, and display the information on the screen. (eventually, I'm going to create a player that will play the episodes, but that's much later) This is how I'm reading the RSS Feed (which is to one of my shows - for testing purposes). click to see My Feed <?php //Errors: ini_set('display_errors', 'On'); error_reporting(E_ALL); $rss = new DOMDocument(); $rss->load('http://tbpc.podbean.com/feed/'); $feed = array(

How to get <img> src from CDATA in RSS?

烂漫一生 提交于 2019-12-01 01:40:35
I am fetching data from RSS feed with Magpie. $rss[description] contains CDATA with html elements: <![CDATA[ <div> <a href='url'> <img src='img_url' alt='aaa' title='bbb' border='0' width='116' height='116'> </a> </div>]]> Some other text How can I fetch " img_url " from this? Is preg_match() the only way? Maybe I can use simpleXML? Tadeck CDATA you have is a string containing HTML. So first treat it as text, but since this text is meant to contain HTML, parse this text using solution appropriate for parsing HTML. In other words: use appropriate tool (HTML parser) for the job (parsing HTML) .

Need read XML and show it and save on Local storage.

萝らか妹 提交于 2019-12-01 01:11:41
I need to read XML data and show this in HTML and at the same time save it in localStorage. When the user is ofline I need show the content using localStorage. ( NOTE: without PHP) ( NOTE: when user have internet read and show new items ) Does anyone have a good tutorial or any helpful website? I found this article/tutorial. It shows how to parse and save a xml file. And how you can query it offline. It is done by using javascript. Article is on mantascode.com by Mantascode and describes how to parse a xml file to localstorage. using a launch.html to parse xml file using java script. <!DOCTYPE

Read rss feeds with c# mvc4

半城伤御伤魂 提交于 2019-12-01 00:44:45
this is my first post. So I have this problem and I'm very new to this language or c#. I have a model that reads the news rss, then using the same index controller I have to pass it to a view. This is my model: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Web; using System.Xml.Linq; namespace Fantacalcio.Web.Areas.Admin.Models { public class FeedGazzetta { public string Title { get; set; } public string Description { get; set; } public string Link { get; set; } public string PubDate { get; set; } public string Image { get; set; } } public

Yahoo YQL RSS - Bad Request

≡放荡痞女 提交于 2019-11-30 23:44:57
For making cross-domain AJAX requests with jQuery, I am trying to use YQL RSS. select * from rss where url='https://www.top1000funds.com/feed/most-popular-posts/' My code: var feed = "https://www.top1000funds.com/feed/most-popular-posts/"; var yql = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22"+encodeURIComponent(feed)+"%22&format=json&diagnostics=true&callback=&rnd=_"+event.timeStamp; console.log(yql); $.getJSON(yql, function(res) { var html = '<div class="feedListWrap">'; if(res.query && res.query.results && res.query.results.item){ //code goes

How to display Atom/RSS feeds in browser with custom XSLT?

依然范特西╮ 提交于 2019-11-30 23:31:06
Back in about 2006, I wrote a nice XSLT that transformed my RSS feeds into custom HTML. That way if a user clicked from a browser it would display as a simple page rather than a bunch of junk XML. If that same URL was used in a feed reader it was handled properly and everything was slick. Now days, most browsers (IE, Firefox, Safari, Opera) seem to grab hold of the styles and won't let go. And Chrome just plain ignores the stylesheet transformation. Given that it has been several years, am I simply forgetting some detail? Didn't it used to just be this easy? <?xml version="1.0" encoding="utf-8

How do I read a secure rss feed into a SyndicationFeed without providing credentials?

坚强是说给别人听的谎言 提交于 2019-11-30 23:16:05
For whatever reason, IBM uses https (without requiring credentials) for their RSS feeds. I'm trying to consume https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en with a .NET 4 SyndicationFeed. I can open this feed in a browser and it loads just fine. Here's the code: using (XmlReader xml = XmlReader.Create("https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en")) { var items = from item in SyndicationFeed.Load(xml).Items select item; } Here's the exception: System.Net

How to get <img> src from CDATA in RSS?

孤街浪徒 提交于 2019-11-30 20:49:06
问题 I am fetching data from RSS feed with Magpie. $rss[description] contains CDATA with html elements: <![CDATA[ <div> <a href='url'> <img src='img_url' alt='aaa' title='bbb' border='0' width='116' height='116'> </a> </div>]]> Some other text How can I fetch " img_url " from this? Is preg_match() the only way? Maybe I can use simpleXML? 回答1: CDATA you have is a string containing HTML. So first treat it as text, but since this text is meant to contain HTML, parse this text using solution