Skip to content

Commit

Permalink
Fixed xml deserialization for missing prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
otto-ifak authored and s-heppner committed Oct 3, 2023
1 parent fde3776 commit bb5cfdd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions basyx/aas/adapter/xml/xml_deserialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ def _tag_replace_namespace(tag: str, nsmap: Dict[str, str]) -> str:
"""
split = tag.split("}")
for prefix, namespace in nsmap.items():
if namespace == split[0][1:]:
return prefix + ":" + split[1]
if prefix:
if namespace == split[0][1:]:
return prefix + ":" + split[1]
return tag


Expand Down

0 comments on commit bb5cfdd

Please sign in to comment.