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

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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: