Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using the Runwayfeedviewer as my starting point.
I want to display a list of videos using Youtube's built in RSS engine.
So I have something like this as my feedUrl: http://gdata.youtube.com/feeds/base/users/myusername/uploads
And I want to get at the resulting "entry" nodes to display what I need in a list.
If anyone has done this could they post a for-each xslt example?
If you want to read XML from URL you can use umbraco.library:GetXmlDocumentByUrl()
Something like this:
<xsl:variable name="tweet" select="umbraco.library:GetXmlDocumentByUrl('http://twitter.com/statuses/user_timeline.xml?screen_name=umbraco')//statuses" />
<ul>
<xsl:for-each select="$tweet/status">
<li><xsl:value-of select="text"/> </li>
</xsl:for-each>
</ul>
Actually, here is the code using youtube's atom namespace.
<xsl:variable name="utubexml" select="umbraco.library:GetXmlDocumentByUrl('http://gdata.youtube.com/feeds/base/users/youtube/uploads')"/>
<xsl:for-each select="$utubexml/*[local-name()='feed']/*[local-name()='entry']">
<xsl:value-of select = "*[local-name()='title']" disable-output-escaping="yes" />
<hr/>
Hope this helps.
That is perfect. Just what I needed.
Gracias.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Embedding YouTube RSS Feed Into Site
I'm using the Runwayfeedviewer as my starting point.
I want to display a list of videos using Youtube's built in RSS engine.
So I have something like this as my feedUrl: http://gdata.youtube.com/feeds/base/users/myusername/uploads
And I want to get at the resulting "entry" nodes to display what I need in a list.
If anyone has done this could they post a for-each xslt example?
If you want to read XML from URL you can use umbraco.library:GetXmlDocumentByUrl()
Something like this:
<xsl:variable name="tweet" select="umbraco.library:GetXmlDocumentByUrl('http://twitter.com/statuses/user_timeline.xml?screen_name=umbraco')//statuses" />
<ul>
<xsl:for-each select="$tweet/status">
<li><xsl:value-of select="text"/> </li>
</xsl:for-each>
</ul>
Actually, here is the code using youtube's atom namespace.
<xsl:variable name="utubexml" select="umbraco.library:GetXmlDocumentByUrl('http://gdata.youtube.com/feeds/base/users/youtube/uploads')"/>
<xsl:for-each select="$utubexml/*[local-name()='feed']/*[local-name()='entry']">
<xsl:value-of select = "*[local-name()='title']" disable-output-escaping="yes" />
<hr/>
</xsl:for-each>
Hope this helps.
That is perfect. Just what I needed.
Gracias.
is working on a reply...