Calling XML using function parameters
I am looking to call some xml but I would like it to be different depending on what is typed into the function paramerter when it is called.
So far I have
function ParseXML(BrandXMLList:XML, Brand:String):void{
var brandlist:XMLList = BrandXMLList.Brand1.customer.name;
etc
etc
etc
}
I am looking to get the Brand1 section to change to Brand 1,2,3,etc , this shall be passed in the functions Brand parameter.
Thanks