making convertXmlObjToArr  a static function