|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Quote:
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 |
|
#2
|
||||
|
||||
|
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 FAQsForum Rules and Posting Guidelines URL canonicalization code solutions Vigorously pursuing the floccinaucinihilipilification of cheap SEO tricks
|
|
#3
|
||||
|
||||
|
Quote:
Quote:
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. |
|
#4
|
|||||
|
|||||
|
Here's a really simple, basic method of parsing an RSS 2.0 feed using php5 and SimpleXML
php Code:
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. |
|
#5
|
||||
|
||||
|
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 |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
||||
|
||||
|
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. |
|
#8
|
|||
|
|||
|
Quote:
Yeah this where I wanna be too. Thanks for the help. |
|
#9
|
||||
|
||||
|
Quote:
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 |
|
#10
|
|||
|
|||
|
Quote:
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 |
![]() |
| Viewing: SEO Chat Forums > Search Engine Strategies > Blogs, Tagging, RSS Feeds > Using RSS Feeds on a webpage |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|