 |
Understanding RSS - Part Nine - Rounding Out The Multi-Media - The CDATA Command
The Controversial CDATA programming construct has caused somewhat of a love-hate relationship among RSS programmers. What is CDATA? Well to put it in very easy terms, it allows us to place within the description sub-element of Item, HTML commands and language. In other words it extends the description by allowing us to create links, references and the like within what is purely a text element created to describe the item.
Remember that within the Item element, the sub-element of description will look like this.
Here is where I describe the item in my RSS feed
Let us say I want to extend this piece and I wanted to get a Bold command or italics command or something else within it. Or perhaps I would want to place a break in the lines dividing it up? Or maybe I want to get more sophisticated? Let me give you an example.
Remember Randy Pandy and his Perfumery at randypandy.com? Well now not only does his wife Sandy want to describe the HeavenScent Skunk Perfume but she wants a picture of the bottle with the description. So, hold on, you say. Easy as pie. Use the enclosure command. Well right and not right. Sure you can put a picture of the perfume bottle in the enclosure command, but it will NOT appear WITH the description. It will appear alone and then the user will have to read the description. So while this is GREAT for audio and video a plain visual that I want next to a description kind of gets left alone if I just put in an enclosure.
So we have the description, and for the sake of all I will repeat it here.
Heaven Scent Perfume the Smell your lover will die for.
Created especially by Skunk Perfumes it is their newest and best
selling perfume on the market today. Purchase a beautifully shaped
skunk bottle with this incredible perfume and get a whopping 50%
off! And if you purchase over $100 we will throw in Free overnight
delivery as well!
Okay now Sandy wants a picture to go right into that description and when the user sees the text in their aggregator they will also get a visual. Thus the CDATA command.
First lets look at it in action and then we will explain.
[CDATA[
Heaven Scent Perfume the Smell your lover will die for. Created
especially by Skunk Perfumes it is their newest and best selling
perfume on the market today. Purchase a beautifully shaped skunk
bottle with this incredible perfume and get a whopping 50% off!
And if you purchase over $100 we will throw in Free overnight
delivery as well! randypandy.com -
All Perfumes You Can Ever desire ]]
Notice first what we did? First we set the tag description. Then within it immediately we tell the file "Hey get ready for some good old HTML", and thus we add the [CDATA[
Next we want our picture of the perfume. So for those of you who know HTML this is simple. We give it the image information.
After that we continue with our description. Get in a few line
breaks with either the or constructs. Then
finally before the end we close it off with ]] tag.
You can get fairly sophisticated with CDATA. The thing is many programmers do NOT like it, as it allows too many rooms for mistakes, and it is a throwback to old HTML. The purity of the XML is kind of compromised here. But it serves a purpose and allows us to get a picture with the words, which is incredibly important. Many, many RSS feeds use it, and it is a very useful tool to get the "picture" across to the user. You can combine it as well with enclosure, to get an audio out, a description, and say a picture of the Album. In other words a full media experience of text + picture + audio.
Well that is it. Our next article will put it all together and give you a look at the final well formed XML file which will act as our template for rss.xml. It will lay it all out for you with a couple of items, so you can grab it and use it for your RSS feed.
This Article was Part Nine of the series - RSS Mania Understanding RSS. All of this series is available at Ezine Articles (ezinearticles.com)
- RSS Mania Addiction - An Introduction to RSS and the Terminology
- Outline of How to Create an RSS Feed
- The Template File
- The Basic Elements of the Channel Element
- How The RSS Feed Works & Some Programming Constructs
- RSS Channel Sub-Elements Specifically Image & How To Use It
- Understanding RSS - Part Seven - The Elements Within the "Item" Element
- Understanding RSS - Part Eight - Podcasting, VideoCasting & The Magic of the Enclosure Sub-Element
Copyright 2005 Ted W. Gross. All rights reserved. (You may publish this article in its entirety with the following author's information with live links only.)Ted W. Gross owns Virgin Earth http://www.virginisrael.com, a real estate brokerage firm in Jerusalem, Israel. Virgin Earth represents residential and commercial real estate all over Israel. Virgin Earth also maintains an RSS Feed on its current properties and also operates Virgin Earth - Israel Tourism & Information Portal on the same site. Ted Gross is also a published author and maintains a web site for his works. This can be found at: http://www.virginisrael.com/twg/iw.html. Virgin Earth Blog can be found at: http://virginearth.blogspot.com/
Article Source: http://EzineArticles.com/?expert=Ted_Gross
|
Related Links: Business Blog Savvy: Avoiding the 8 Pitfalls of Do-It-Yourself Blogging
How to Set Up a Blog the Media Will Love
Blogging for Fun and Profit
What Is This Blogging Thing Then?
How To Make Money Writing Blog Novels
|
|
 |
|
|
 |

Everything you need to know about blogging, rss to podcasting, etc. |
RSS Feeds for Teachers Can Stop Classroom Management Problems and Streamline Your Time
(Submitted by: Ruth Wells)
It may be a new year, but you are probably still dealing with the same
old "kid problems." The bad attitudes, disrespect, peer conflict,
lying, school failure or family problems didn't change when you flipped
the page on the calendar. Don't ... Read article
RSS Revolution and Definition
(Submitted by: Vinay Rana)
RSS (Really Simple Syndication) is channelizing or syndicating the flow of content from different sources to different target WebPages or websites.It has helped in content providing website to distribute their data across the globe using ... Read article
Displaying RSS Feeds on Your Web Page
(Submitted by: Sanjay Johari)
RSS feeds have made it very convenient to syndicate information from various sources. Most of websites and services that publish fresh content, such as ezines, press release, new agencies, blogs make their content available thru RSS feeds. As new ... Read article
RssToBlog Review
(Submitted by: Tony Guribal)
Here is review of RSStoBlog by an owner of the product
The RSStoBlog software is an wonderful piece of automation. Developed by the author to have all blogs updated, it has evolved into a feature packed auto blogger update package. No ... Read article
The Basics of RSS
(Submitted by: Jonathan Coupal)
RSS stands for Really Simple Syndication, and it is a standard, public format designed for sharing headlines and the content of web sites (previously known as the RDF Site Summary).
But RSS feeds are not just for news anymore. Almost anything ... Read article
More articles
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
|
|
 |
|
|
|
|
|
|
| |
|
Our Articles RSS Feed |
|