Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dave Rollins 35 posts 48 karma points
    Jan 10, 2010 @ 16:14
    Dave Rollins
    0

    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?

     

  • Jukka-Pekka Keisala 90 posts 226 karma points
    Jan 10, 2010 @ 20:00
    Jukka-Pekka Keisala
    0

    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>

     

  • Jukka-Pekka Keisala 90 posts 226 karma points
    Jan 10, 2010 @ 20:18
    Jukka-Pekka Keisala
    0

    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. 

  • Dave Rollins 35 posts 48 karma points
    Jan 16, 2010 @ 12:40
    Dave Rollins
    0

    That is perfect. Just what I needed.

    Gracias.

Please Sign in or register to post replies

Write your reply to:

Draft