You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
431 B
13 lines
431 B
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>(.*?)<\/Message>/g)[0].replace(/<[^>]+>/g, '')
|
|
}
|
|
}
|