added getAttributes method to XMLElement