Parsing iTunes RSS Feed

Andre Garzia soapdog at mac.com
Sun Sep 17 18:42:06 EDT 2006


Sivakatirswami,

the colon thing is what is called a namespace. this way you can group  
some tags as belonging to one namespace. This is done to avoid  
collisions such when a XML has mixed info in it added by two  
different specs and both use the same tag so <itunes:summary> is a  
summary tag belonging to iTunes namespace and <andre:summary> would  
be a summary tag added by me. They would not mix.

libXML2 supports this thing but this is not exposed in RevXML upper  
layers. You have two options for parsing this: One is to use Ken Ray  
XML Lib that treats them all like strings and can cope with name  
spaces just fine. Or if you want to use RevXML then use a REGEX match  
to find every ":" inside < > signs, convert them to dashes "-", goog,  
your tag now looks like <itunes-summary> and you're able to use it  
with RevXML.

Hope I helped.
Andre



On Sep 17, 2006, at 8:27 AM, Sivakatirswami wrote:

> I'm getting an error here:
>
>  put revXMLNodeContents(tCurrTree,"/rss/channel/itunes:summary/") into
> tSummary
>
> where the source is
>
> <itunes:summary>Summary Text here.... </itunes:summary>
>
> As an XML infant and  RSS baby, I need help...
> how does one parse  nodes like
> <itunes:summary>
> <itunes:email>
>
> etc. That: node{colon]parameter... is news to me.
>
> Also  stand  alone tags return empty:
>
> put revXMLNodeContents(tCurrTree,"/rss/channel/item/enclosure/") into
> tURL
>
> if /enclosure is:
>
> <enclosure
> url="http://www.himalayanacademy.com/audio/inspiredtalks/gurudeva/ 
> taka/1998/gr-taka_1998-11-05.mp3"
> length="5048830" type="audio/x-mp3" />
>
> Rev doesn't see  the [space /] as a valid end  tag and  simply does  
> not
> parse the data....
>
>
> Sivakatirswami
>
> alias
>  "too lazy to spend 3 hours figuring this out when i can post to
> UseRevolutionlist"
>
> and
>
>  "Oh my! I may have to reincarnate just to pay back the debt I owe to
> all the generous souls on this list." (smile)
>
> www.himalayanacademy.com
>
> Get Hinduism Today Digital Edition. It's Free!
> http://www.hinduismtoday.com/digital/
> (and built w/ Revolution)
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list