Extracting attribute from escaped XML tag in XSLT?

dtn2603

New Member
So I've been working on some XSLT to modify YouTube's RSS XML, and of course as soon as I got it working, they've changed their formatting. Before, each video's unique ID was stored between \[code\]<videoid>\[/code\] tags, which you could then use to create a URL. But now the only way to get a video's URL is from a tag like this\[code\]<media:player url='https://www.youtube.com/watch?v=XXXXXXXXXXX&feature=youtube_gdata_player'/>`\[/code\]which is contained within \[code\]<media:group>\[/code\] tags.The way I've been trying to get at it is\[code\]<xsl:value-of select="media:group/media:player@url" />\[/code\]but doing that gives me a compilation error that says \[code\]xsl:value-of : could not compile select expression 'media:group/media:player@url'\[/code\]Does anyone see anything wrong with that?Also, as a side note, I want to do something similar with\[code\]<xsl:value-of select="media:group/media:thumbnail@url" />\[/code\]however there are several \[code\]<media:thumbnail>\[/code\] tags for each entry; would this just grab the first one, or would this potentially cause errors?
 
Back
Top