so you're trying to access a node based on a string?

var nodeName:String = "actor";
var node:XMLList = myXML.child(nodeName);

that will return the actor node in the movie xml. You can then access an attribute for that node

var attributeName:String = "name";
var nodeAttribute:XMLList = node.attribute(attributeName);