Blogs, Tagging, RSS Feeds
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsSearch Engine StrategiesBlogs, Tagging, RSS Feeds

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
  #1  
Old November 27th, 2007, 05:56 AM
inzane909 inzane909 is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 30 inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 8 h 48 sec
Reputation Power: 2
Quote:
Originally Posted by Janna122003
I don't think so, maybe RSS has an exception with duplicate content since many webmasters uses RSS feeds.

Any comment about it?


Hi I have been going through an XML book, because I really want to get to grip with 'pumping feeds' through some of my sites.
One thing I noticed about XML is that it uses tags that you make up yourself. So you wouldn't be using <p> or <H> tags in the feeds.
Corect me if I am wrong but if website copy isn't inside these HTML tags, doesnt it get ignored for the most part?? Perhaps this is someway to answering the question??

Cheers

Reply With Quote
  #2  
Old November 27th, 2007, 06:06 AM
JagNet's Avatar
JagNet JagNet is offline
Smoke me a kipper...
Click here for more information. Click here for more information
 
Join Date: Aug 2007
Posts: 2,390 JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 13 h 28 m 5 sec
Reputation Power: 45
I'm not sure exactly what you mean here, but I'll try to answer it.

XML does allow you to create your own tags, although for standard feeds such as RSS there is a predefined set of tags and an accepted format.

You can place html within xml tags, but you either have to escape the html, or place it within CDATA blocks.

You wouldn't place the feed xml directly into a web page. You would either parse the feed, extracting the content and place it into the webpage inside standard html tags, or convert it using XSLT.
__________________
... I'll be back for breakfast
New to SEO? SEOChat SEO FAQs
Forum Rules and Posting Guidelines
URL canonicalization code solutions
Vigorously pursuing the floccinaucinihilipilification of cheap SEO tricks

Reply With Quote
  #3  
Old November 27th, 2007, 06:13 AM
inzane909 inzane909 is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 30 inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 8 h 48 sec
Reputation Power: 2
Quote:
Originally Posted by JagNet
You can place html within xml tags, but you either have to escape the html, or place it within CDATA blocks.

You wouldn't place the feed xml directly into a web page. You would either parse the feed, extracting the content and place it into the webpage inside standard html tags, or convert it using XSLT.
Thats great!, where can I find out how to that?

Quote:
you would either parse the feed, extracting the content and place it into the webpage inside standard html tags
This would be automated, correct?


I have searched the net looking for this, but there is so much crap on RSS I havent been able to find a tut relating to this specific issue.

Last edited by inzane909 : November 27th, 2007 at 06:16 AM.

Reply With Quote
  #4  
Old November 27th, 2007, 07:21 AM
JagNet's Avatar
JagNet JagNet is offline
Smoke me a kipper...
Click here for more information. Click here for more information
 
Join Date: Aug 2007
Posts: 2,390 JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 13 h 28 m 5 sec
Reputation Power: 45
Here's a really simple, basic method of parsing an RSS 2.0 feed using php5 and SimpleXML
php Code:
Original - php Code
  1. <?php
  2.  
  3. // fetch the RSS feed using file_get_contents
  4. $file = file_get_contents('http://feeds.bbc.co.uk/nmfeeds/rss/snippet.xml');
  5.  
  6. // load the file as a SimpleXML object
  7. $xml = simplexml_load_string($file);
  8.  
  9. // output the channel title
  10. echo '<h1>' . (string) $xml->channel->title . '</h1>';
  11.  
  12. // loop through items, outputting each as a linked title with description underneath
  13. foreach ($xml->channel->item as $item) {
  14.  
  15.         echo '<h2><a href="'(string) $item->link . '">'
  16.                 . (string) $item->title
  17.                 . '</a></h2>';
  18.                
  19.         echo '<p>'
  20.                 . (string) $item->description
  21.                 . '</p>';
  22. }
  23. ?>


Note, this is a very simple version, and there's no error checking involved, and no ability to cache the feed locally (requesting the feed for every page load won't make you popular!). It does give you a starting point though.

Reply With Quote
  #5  
Old November 27th, 2007, 07:26 AM
JagNet's Avatar
JagNet JagNet is offline
Smoke me a kipper...
Click here for more information. Click here for more information
 
Join Date: Aug 2007
Posts: 2,390 JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 13 h 28 m 5 sec
Reputation Power: 45
Thread Split

NB - Since this thread is moving away from the original question, I've split it into its own thread.

Last edited by JagNet : November 27th, 2007 at 09:18 AM. Reason: errant apostrophe

Reply With Quote
  #6  
Old November 27th, 2007, 09:41 AM
inzane909 inzane909 is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 30 inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 8 h 48 sec
Reputation Power: 2
Smile

Yes it was going a bit off tangent,

Right I see, I will play around with your example a bit later on.

Thank you for that.
Like I say I am going throught this XML book at the mo, its quite basic but address things you mentioned like the CDATA blocks etc. Unfortuanetly it doesnt touch on RSS though. So its going to have to be another book if I want to get at least half decent at RSS or at least good enough to ustilse it effectively.

I guess what I an asking here is whether their is a decent online source to find out exactly what I need to know, like I say I have trawled through so many 'half truths' or people punting their own feeds, and I am only marginaly closer to finding out the basics of using feeds.

Thanks

Reply With Quote
  #7  
Old November 27th, 2007, 10:14 AM
JagNet's Avatar
JagNet JagNet is offline
Smoke me a kipper...
Click here for more information. Click here for more information
 
Join Date: Aug 2007
Posts: 2,390 JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 13 h 28 m 5 sec
Reputation Power: 45
RSS is basically just XML with predefined elements in order to ensure consistency which makes for more simple, and more widespread syndication.

For RSS 2.0 specs see cyber.law.harvard.edu/rss/index.html

Sadly, decent XML resources are somewhat thin on the ground. Whereas it's possible to find decent tutorials on almost all other aspects of web development, XML continues to languish behind. Quite remarkable really when you consider just how useful it can be. Hopefully this may change as php's XML handling continues to improve -- prior to php5 dealing with XML in php was just a major pain in the proverbial.

Once you do get into it, it's great fun. I love playing around with Amazon and eBay APIs now, both of which use XML extensively.

Reply With Quote
  #8  
Old November 27th, 2007, 03:36 PM
inzane909 inzane909 is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 30 inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 8 h 48 sec
Reputation Power: 2
Quote:
Originally Posted by JagNet
Once you do get into it, it's great fun. I love playing around with Amazon and eBay APIs now, both of which use XML extensively.


Yeah this where I wanna be too. Thanks for the help.

Reply With Quote
  #9  
Old November 28th, 2007, 04:14 AM
JagNet's Avatar
JagNet JagNet is offline
Smoke me a kipper...
Click here for more information. Click here for more information
 
Join Date: Aug 2007
Posts: 2,390 JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 13 h 28 m 5 sec
Reputation Power: 45
Quote:
Originally Posted by inzane909
Yeah this where I wanna be too. Thanks for the help.


You may find the Zend Framework useful in that case. There are "modules" for consuming RSS feeds and dealing with the Amazon API, both of which can be used on their own without having to use the whole framework.

I found that deconstructing the code and working out what the various classes within were doing gave me a much better understanding of dealing with XML and DOM than any online tutorial ever had. Plus, their standard of writing php is very very high -- that in itself is worth the time spent looking into the framework if it inspires you to make your own code look as good.

There's also a module dealing with caching, so you could use that together with the RSS module to consume RSS feeds and put them on your site.

The project is now out of Beta, which is a bonus too.

framework.zend.com

Reply With Quote
  #10  
Old November 28th, 2007, 10:44 AM
inzane909 inzane909 is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 30 inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level)inzane909 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 8 h 48 sec
Reputation Power: 2
Quote:
Originally Posted by JagNet
You may find the Zend Framework useful in that case. There are "modules" for consuming RSS feeds and dealing with the Amazon API, both of which can be used on their own without having to use the whole framework.

I found that deconstructing the code and working out what the various classes within were doing gave me a much better understanding of dealing with XML and DOM than any online tutorial ever had. Plus, their standard of writing php is very very high -- that in itself is worth the time spent looking into the framework if it inspires you to make your own code look as good.

There's also a module dealing with caching, so you could use that together with the RSS module to consume RSS feeds and put them on your site.

The project is now out of Beta, which is a bonus too.

framework.zend.com


It looks kinda advanced. I wish I had time to get into it, but alas I have to stick to the daily grind. Im gonna have some fun getting into XML & RSS supplying content to my sites though etc.

Cheers

Reply With Quote
Reply

Viewing: SEO Chat ForumsSearch Engine StrategiesBlogs, Tagging, RSS Feeds > Using RSS Feeds on a webpage


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!</