"TheEndless" wrote:
You'll need to user getNamedElement() to get nodes with namespaces. You may need to break it into multiple statements, but something like this should work:
xml.channel.item[0].getNamedElements("media:content")[0]@url
Actually can do it even simpler, because
ifXMLList supports
getNamedElements() just like
ifXMLElement does (i.e. no need to zero-in on the exact element just yet)
xml.channel.item.getNamedElements("media:content")
But then will still have to add `[idx]@url` for the specific attribute as needed - because
GetAttributes() does not work the same way for
ifXMLList, so one cannot do
xml.channel.item.getNamedElements("media:content").getAttributes().url 'No good
xml.channel.item.getNamedElements("media:content")@url 'No good
'but this will do
xml.channel.item.getNamedElements("media:content")[idx]@url 'OK with single row
I like to give credit to roXML when it deserves it: it has some... affordances
🙂