Answered
XPathAPI
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!
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!
