rss

XML fix namespace declaration

让人想犯罪 __ 提交于 2019-12-23 03:48:08
问题 I am trying to detetct/work around this bug in RSS elements. That means I have to find a wrong namespace-declaration and change its value to the correct namespace. E.g: xmlns:media="http://search.yahoo.com/mrss" must be: xmlns:media="http://search.yahoo.com/mrss/" How can I achive that given a org.w3c.Document? I meanwile found out how to get all elements of a certain namespace: XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); XPathExpression expr = xpath.compile("

XSLT creating a table with varying amount of columns

爷,独闯天下 提交于 2019-12-23 03:21:41
问题 I have a RSS feed i need to display in a table (its clothes from a webshop system). The images in the RSS vary in width and height and I want to make a table that shows them all. First off i would be happy just to show all of the items in 3 columns, but further down the road i need to be able to specify through a parameter the amount of columns in my table. I run into a problem showing the tr tag, and making it right, this is my Code so far: <xsl:template match="item"> <xsl:choose> <xsl:when

jQuery Functions need to run again after ajax is complete

こ雲淡風輕ζ 提交于 2019-12-23 03:08:11
问题 I am developing a website that parses rss feeds and displays them based on category. You can view it here: http://vitaminjdesign.com/adrian I am using tabs to display each category. The tabs use ajax to display a new set of feeds when they are clicked. I am also using two other scripts- One called equalheights, which re-sizes all of the heights to that of the tallest item. And the other script I am using is called smart columns, which basically resize your columns so it always fills the

iPhone RSS Reader — parseXML won't Load some XML feeds

我们两清 提交于 2019-12-22 21:07:44
问题 I am using the SIMPLE RSS reading example found at http://theappleblog.com/2008/08/04/tutorial-build-a-simple-rss-reader-for-iphone/ It uses parseXML to load the RSS feeds. Here is the problem I am having. For the following RSS feed example, I am having trouble getting it to load the feed. Comes up with an error that it cannot connect. However on my Mac RSS Reader it works fine, so I know the link is good. Any ideas on why it cannot load this particular feed but it can load others fine? http:

iPhone RSS Reader — parseXML won't Load some XML feeds

可紊 提交于 2019-12-22 21:07:23
问题 I am using the SIMPLE RSS reading example found at http://theappleblog.com/2008/08/04/tutorial-build-a-simple-rss-reader-for-iphone/ It uses parseXML to load the RSS feeds. Here is the problem I am having. For the following RSS feed example, I am having trouble getting it to load the feed. Comes up with an error that it cannot connect. However on my Mac RSS Reader it works fine, so I know the link is good. Any ideas on why it cannot load this particular feed but it can load others fine? http:

Using openStream with a URL that has a subdomain with an underscore in it returns ioexception in Android. Why?

时光毁灭记忆、已成空白 提交于 2019-12-22 19:36:07
问题 I have the following code which is pretty standard for fetching an xml document from the web in Android (from what I understand): URL rssUrl = new URL("web_1.whatever.com"); SAXParserFactory mySAXParserFactory = SAXParserFactory.newInstance(); SAXParser mySAXParser = mySAXParserFactory.newSAXParser(); XMLReader myXMLReader = mySAXParser.getXMLReader(); RSSHandler myRSSHandler = new RSSHandler(); myXMLReader.setContentHandler(myRSSHandler); myXMLReader.parse(new InputSource(rssUrl.openStream()

Output RSS feed as html?

杀马特。学长 韩版系。学妹 提交于 2019-12-22 16:58:35
问题 Are there any free php/javascript libraries out there which would help in displaying an RSS feed as html? 回答1: In my Opinion Simplepie is one of the Best RSS parsers. Here is an example: require_once('simplepie.inc'); $feed = new SimplePie(); $feed->set_feed_url('http://simplepie.org/blog/feed/'); $feed->init(); $feed->handle_content_type(); <?php foreach ($feed->get_items(0, 5) as $item): ?> <div class="item"> <h2 class="title"><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item

JavaScript Callback Functions and Google Feed API

ε祈祈猫儿з 提交于 2019-12-22 14:54:23
问题 I'm trying to implement a few feeds into my site using a div-populating function. Previously, I had identical JavaScript code blocks through my page (one for each feed), but in the interest of being a good (or better) coder, I decided to stick the repetitive code into an external script file and run it with varying parameters instead. Unfortunately, the feeds refuse to load with my new implementation, and I'm running out of ideas. I structured my callback function based on user ndp's

RSS feed display

北城以北 提交于 2019-12-22 13:52:39
问题 I have created a news RSS feed for my website but want to display is in a format similar to http://www.apple.com/hotnews/ How would I put code onto my HTML page which would take the items from my RSS? 回答1: You could use XSLT and CSS. If you didn't care about links working, etc., then just use CSS. For instance, here is how I style one of the RSS feeds on one of my sites: channel link, channel language, channel copyright, channel managingEditor, channel webMaster, channel docs, channel

Processing RSS Feeds with Namespaces in Android

浪子不回头ぞ 提交于 2019-12-22 12:54:33
问题 I'm trying to write an XML parser that takes an RSS feed & fetches the image urls shown in the url attribute of the <media:thumbnail> tag. This is all being done via android.Util.Xml , & is an adaptation of the code shown here. An example RSS feed that I'm trying to use is the BBC News RSS feed. However, media is an additional namespace & (probably) as a result my parser isn't working as it should. A version of my parse method is below. Is there any (no doubt simple) way to get my list of