2018-03-25T19:00:40Z||2018-03-25T19:00:40Z


DOMParser.parseFromString返回一个Document对象。Document.documentElement返回根节点(HTMLElement类型).

const parser = new DOMParser();
const rootElement = parser.parseFromString(xml, 'application/xml').documentElement;