diff --git a/src/module/xml-import/xml-import.mjs b/src/module/xml-import/xml-import.mjs index ee5023ab..f88ab7ae 100644 --- a/src/module/xml-import/xml-import.mjs +++ b/src/module/xml-import/xml-import.mjs @@ -43,7 +43,7 @@ function getJsonFromXML(dom) { // initializing object to be returned. let jsonResult = {}; - let attributes = dom.attributes + let attributes = dom.attributes ? dom.attributes : [] for (let attribute of attributes) { jsonResult[attribute.name] = attribute.value } @@ -108,7 +108,7 @@ function calculateBirthdate(json) { */ function mapRawJson(rawJson) { let json = {} - let held = rawJson.held; + let held = rawJson.helden.held; json.name = held.name json.meta = {} json.meta.spezies = held.basis.rasse.string