Posts & Links:How can I select the attribute of a single element from multiples?
In a YouTube favorites feed, the items look like:
<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
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/@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.
- The topic ‘Posts & Links:How can I select the attribute of a single element from multiples?’ is closed to new replies.