Posts & Links:How can I select the attribute of a single element from multiples? (1 post)

  1. Su
    Posted 3 years ago #

    In a YouTube favorites feed, the items look like:

    <entry gd:etag='W/"DEMHRn47eCp7I2A9WhNVGUU."'>
    <category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#favorite'/>
    <link rel='alternate' type='text/html' href='VIDEO PERMALINK'/>
    <link rel='related' type='application/atom+xml' href='RELATED URLS'/>
    <link rel='self' type='application/atom+xml' href='FEED SELF-LINK'/>

    Note the multiple link elements.
    My problem is that I need the href value of the first of those, and $(link/@href) in Custom Post Settings returns the value of the last one. I've tried $(link[1]/@href) which seems like it might be correct XPath, but it doesn't work. And since whatever flavor FWP is using isn't really documented I have no idea if it's me that's wrong or the plugin.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • FeedWordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.