I'm having trouble calling XPath from one of my as2.0 classes. I'm fairly new to as2.0, so I'm sure it's just a problem with my syntax as I'm still getting a handle on scope and such. When I try to use the method XPath, I get the error "There is no method with the name 'XPath'." I guess that means that I can't reference the XPath method from within a method of a class I created, right? What am I doing wrong?

Here's a simplified example of what I'm trying to accomplish.

Class code (actionscript)
PHP Code:
class AudioData {
var xmlfile:String
function AudioData(x:String){ // CONSTRUCTOR
myXML = new XML();
xmlfile x;

    private function 
myXML.load(xmlfile); // LOAD THE XML FILE
myXML.onLoad = function(success){
            if (
var recordset XPath.selectNodes(this,"/Path/To/XML/Node");
                for (
trace (recordset[n]) // PRINT TO THE OUTPUT WINDOW

on frame 1 of my main timeline
// Import the XPath classes
import com.xfactorstudio.xml.xpath.*;
allData = new AudioData("xmldata.xml");