export class ParseXML { constructor() {} public sanitize(str: string): string { let sanitizeString = encodeURIComponent(str).replace(/%0A/g, '') return decodeURIComponent(sanitizeString) } public static getXMLResponseMessage(responseBody: string): string { let parseXMLClass = new ParseXML() return parseXMLClass.sanitize(responseBody).match(/(.*?)<\/Message>/g)[0].replace(/<[^>]+>/g, '') } }