Problem with some XML tags

I am trying to parse a RSS feed, and it's working with tags that have a closing tag, such as <title>, but not for the ones that end with /> such as <enclosure .... />
See below:
var doc = XMLDOM.parse(url.result);
var items = doc.evaluate("rss/channel/item");
for (var i=0; i<items.length;i++){
log("val is:" + items.item(i).evaluate('string(title)') + "\n\n"); //works
log("val is:" + items.item(i).evaluate('string(enclosure@url)') + "\n\n"); //does not work

0 Replies

Recent Posts

in General Discussion at YDN