|
|
@@ -24,11 +24,11 @@ export function XmlToReact(
|
|
|
//console.log("html string:", text);
|
|
|
const parser = new DOMParser();
|
|
|
const xmlDoc = parser.parseFromString(
|
|
|
- "<root><root>" + text + "</root></root>",
|
|
|
+ "<root>" + text + "</root>",
|
|
|
"text/xml"
|
|
|
);
|
|
|
- const x = xmlDoc.documentElement.childNodes;
|
|
|
- return convert(x[0], wordWidget, convertor);
|
|
|
+ const x = xmlDoc.documentElement;
|
|
|
+ return convert(x, wordWidget, convertor);
|
|
|
|
|
|
function getAttr(node: ChildNode, key: number): Object {
|
|
|
const ele = node as Element;
|