(xmlStr: string, options?: xml2js.OptionsV2)
| 15 | } |
| 16 | |
| 17 | export function parseXML(xmlStr: string, options?: xml2js.OptionsV2): any { |
| 18 | const parser = options !== undefined ? new xml2js.Parser({ ...options }) : new xml2js.Parser(); |
| 19 | let xmlObj; |
| 20 | parser.parseString(xmlStr, (err: any, result: any) => { |
| 21 | if (!err) { |
| 22 | xmlObj = result; |
| 23 | } |
| 24 | }); |
| 25 | return xmlObj; |
| 26 | } |
| 27 | |
| 28 | export async function writeXML(object: any): Promise<any> { |
| 29 | return new Promise((resolve) => { |
no outgoing calls
no test coverage detected