8 Replies Latest reply on May 30, 2007 2:44 PM by Greg Dove

    XPathAPI

    Semantica
      Hi all,

      I have been unable to get the XPathAPI to work. Here is my code:

      var layerList:Array = XPathAPI.selectNodeList(this.firstChild, "/ViewContext/LayerList/Layer");

      //grab the name
      for(i = layerList.length - 1; i >= 0; i--)
      {
      var xmlNode:XMLNode = layerList ;
      var lName:String = XPathAPI.selectSingleNode(xmlNode.firstChild, "Name").firstChild.nodeValue;
      }

      The var lName is returned as undefined. Any ideas?

      Thank you in advance!