[Help] Using Items in RSS

I'm working on a desklet that shows the Top 10 iTunes songs (inspired by an OS X widget) - nothing special, but it's just a little project. What I want to do is retrieve the artist name and song seperately so I can print it out neater in the desklet. Here's the RSS: http://phobos.apple.com/WebObjects/MZStore...imit=10/rss.xml

You'll notice that the artist and song are in different nodes itms:artist and itms:song, respectively. Right now I'm using the "title" node and it'll print out, for example, 1. Don't Forget About Us (Radio) - Mariah Carey.

<layer text="!XMLTXT:0[rss//channel//item[1]//title]" x="20" y="180" height="20" width="260" fontname="Verdana" fontsize="10" fontcolor="clWhite" fontstyle="B" fontalign="LT" onmouseenter="highlight(true);" onmouseexit="highlight(false);" fullhittest="yes" mousecursor="32649" onclick="onClickItem(1)" />

That's the code I'm using for it. However, when I change it to "...item[1]//itms:artist]", it doesn't work. Any suggestions?

#342892

I'm not infront of my PC so I can't test it.. But I think what you want is:

/rss/channel/item[1]/itms:artist

// means any matching path

/ doesn't mean the same exact thing..

Again. I don't have my pc right now.... If I get a chance I'll do a quick look at it today.

#343031

Nope, that didn't seem to work.

Also, I think the // should be fine... there's really only one path, anyway, right?

#343048

Xpath treats : as the namespace sign. Have to dig in more deeply now, wait, please

#343055

it works fine in MSXML, so I think it's an issue in the AveScripter parser. Probably the ":".

#343056

MSXML gives me an error message that itms is not a defined namespace!

I'll look into it more.

#343101

You can always try to use XML Transformation sheets.... using the xmltrans look at the weatherdesklet example.

I'll be away for the holidays..

#343113

Okay, I'll check it out :D

EDIT: Ah yes, that was my second choice! Thanks... I'll try that out when I get the chance to.

EDIT 2: yay! !XMLTRANSTXT:[substring-before(rss//channel//item[1],' -')] worked out!

#343120

Super!

And you can make complex XML results like the weather one that builds carriage returns etc.. using an external file.

#343398