Beta
Parse XML into a JS object with no validation and some failure tolerance
The input XML string
Optional parsing options
The parsed XML
const obj = parseXml('<root><child>text</child></root>');assert(obj.childNodes[0].nodeName === 'root');assert(obj.childNodes[0].childNodes[0].nodeName === 'child');assert(obj.childNodes[0].childNodes[0].childNodes[0].nodeValue === 'text'); Copy
const obj = parseXml('<root><child>text</child></root>');assert(obj.childNodes[0].nodeName === 'root');assert(obj.childNodes[0].childNodes[0].nodeName === 'child');assert(obj.childNodes[0].childNodes[0].childNodes[0].nodeValue === 'text');
Parse XML into a JS object with no validation and some failure tolerance