Skip to content

Commit bb5cfdd

Browse files
bjoern-ottos-heppner
authored andcommitted
Fixed xml deserialization for missing prefixes
1 parent fde3776 commit bb5cfdd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

basyx/aas/adapter/xml/xml_deserialization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ def _tag_replace_namespace(tag: str, nsmap: Dict[str, str]) -> str:
8585
"""
8686
split = tag.split("}")
8787
for prefix, namespace in nsmap.items():
88-
if namespace == split[0][1:]:
89-
return prefix + ":" + split[1]
88+
if prefix:
89+
if namespace == split[0][1:]:
90+
return prefix + ":" + split[1]
9091
return tag
9192

9293

0 commit comments

Comments
 (0)