Refactored xml parsing to xml2js library