xpath @ work

I was asked to show xpath as used in my Flash 2 project, so with out further adieu, a crash course in xpath:

Flash Blog

The project is simple enough, use xpath to parse xml information to an array, and from there, you can do whatever you want with the info.

xpath01

First, make sure you import xpath from the appropriate directory, after you down load the package from the provided link.

xpath 02

The function that parses the xml is very simple, just be mindful of the hierarchy of what you are looking for within the xml file. Also include what you want to happen once the xml is loaded, in this case, a function that starts the whole thing moving.

xpath 03

Then, all you have to do is tell the file where to look (the url var that is declared with your other vars) and tell it what to do once it’s done loading the xml (in this case, perform the aforementioned function).

And that’s xpath in a nutshell as best I can describe it. See it in work.

One Response to “xpath @ work”

  1. Roger Says:

    Thats very cool, AK. Thanks for posting that explanation.

Leave a Reply