Added new parameter to action function, we now send an array containing the elementName and then an array of attributes to return.
Corrected the getData function to parse the XML more efficiently
Updated the getData function to correctly get the element, whether it is the root or not
Updated the getData function to check if the element has an attribute with the correct name, before trying to return it