Is it necessary to use CDATA in RSS feed format? - rss

In RSS feed, is CDATA really necessary to write? Can't we just give the main details and update the same every time? If so what are the advantages and dis-advantages? Any one out there to brief about the same? Thanks in advance.

RSS feed is valid XML document. So you have to use CDATA to mark content as textual data, not as markup.
Also: What does <![CDATA[]]> in XML mean?

Related

Selecting specific namespaced content from an RSS feed using coreylib

I am attempting to use coreylib to do some RSS feed parsing. So far, it has performed well enough for what I'm using it for (which is not bad, considering the only documentation I can find is what's on the github page...!)
Recently, however, I've run into problems parsing the Metro News Toronto RSS feed. When I try to parse the each item node to retrieve the text in its title node, I get the text in the media:title tag instead, since coreylib seems to ignore namespaces.
Is there any way to retrieve what I need (the actual title node!) from the feed?
As it turns out, coreylib doesn't support namespaced XML feeds.
I bit the bullet and rewrote my entire parser using SimpleXML.

XML to nested repeater control ASP.net

I followed this simple tutorial and created a nested repeater.
This tutorial is simple enough so i could easily create something like that.
But I have different XML structure in my organisation which i can't change. My XML structure is repeated structure of this.
<pupil>
<academicYear>2011/2010</academicYear>
<grade>Kindergarten 1</grade>
<class>class 1</class>
<name>emma</name>
<admissionDate>01/05/2010</admissionDate>
<language>English</language>
<CountryofBirth>United Kingdom</CountryofBirth>
<fullName>emma watson</fullName>
</pupil>
I would like to see academicYear, grade, class, name, admissiondate, etc As Titles.
And below each title, there should be coresponding data about it.
Eg.
*Academic Year
-2011/2010
-2010/2009
*Grade
-kingdergarten1
-kingdergarten2
-kingdergarten3
I don't post all my code again coz it's same as in this tutorial. Please don't tell me why don't u go and ask the guy who made that tutorial. I found people here are very nice and always helpful.
Thanks so much.
Having looked at the tutorial and your XML, the big difference between your XML and the example given on the tutorial is that yours isn't nested XML.
I'd also dispute your assertion that you cannot change the XML structure. Sure, you might not be able to change what you get from the service that is providing you with the XML, but there is no reason why you couldn't reorganise the XML you are receiving into a nested XML document that is more compliant with your intentions.

Update RSS from another XML file?

Hey. I am quite new to the whole web development/programming. I am trying to create an RSS feed which gets info from a separate XML file.
I know basics about XML and RSS, but I don't know how to make it updade. Lets say I update the XML then how would the RSS update automatically? Can someone maybe put me on the right track? Thanks in advance.
In which programming language do you want to accomplish this? One way would be to run a program that does some XML parsing and writing, e.g. PHP with SimpleXML and running the script as a cronjob.
[Edit:]
You could use LINQ to XML for that in ASP.NET, it is easy to use, just look at tutorials like Using LINQ to XML or
Introduction to LINQ - Simple XML Parsing

Conversion from RSS to RDF

I don't quite understand RDF, but I am looking to convert RSS feeds from places like yahoo and google into RDF format to display on a website.
Any advice/help would be greatly appreciated.
Thanks!
Update: it seems I need to understand XSTL and stuff like that.
RSSOwl implements both RSS and RDF. It's open source.
Some of the RSS variants are RDF compatible :
http://diveintomark.org/archives/2004/02/04/incompatible-rss
So one solution could be to convert the other RSS variants via XSL-T to an RDF compatible version (e.g. 1.0).

How can I convert an RSS feed to Atom, inline?

I admit to being a bit behind the times when it comes to understanding RSS/Atom feed issues.
All I know is, I want to have an Atom feed converted to an RSS feed inline. Meaning that I want to specify an option somewhere that says use this xsl or whatever to convert the Atom feed to an RSS feed.
Is there some way to accomplish this that doesn't require running a separate listener on my local box to do the translation? I.e. Instead of directly asking for the Atom feed, I get my 'service' to get the feed, transform it and give it to the real subscriber?
Sorry for the (probably) dumb question. Somehow I never got the memo on this stuff.
Thanks - Jon
Similar to Paul's answer... we use Feedburner for feeds - it's trivial to have it convert one type of feed to another.
Atom to RSS on the fly
Sounds like a Yahoo Pipes job to me..
http://pipes.yahoo.com/pipes/pipe.info?_id=Aj_YHfi62xGuBj4KkAtvUw
If you want to write your own, using C#. You would download the Atom and save it as RSS using the SyndicationFeed class. It's about 4 lines of code.

Resources