sharing small pieces of rocks or jewels I find on the way

Archive for April, 2008

XPath example

I have used XPath before, recently when I needed I forgot the syntax, so thought of keep it written here. It may come helpful for some others as well

import mx.xpath.XPathAPI;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
    var thumbs:Array = XPathAPI.selectNodeList(this.firstChild, “/rss/channel/item/media:thumbnail”);
    for(var i in thumbs)

This tutorial was a great help.