diff --git a/pyproject.toml b/pyproject.toml index 9d739ec..6e85689 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "soda-svg" packages = [{include = "soda"}] -version = "2.0.1" +version = "2.0.2" description = "Fast SVG generation tool" authors = ["Dmitry Gritsenko "] license = "MIT" diff --git a/soda/xml_parse.py b/soda/xml_parse.py index 549699e..df94d32 100644 --- a/soda/xml_parse.py +++ b/soda/xml_parse.py @@ -44,9 +44,12 @@ def process_children(element: etree._Element) -> Iterable[Tag]: def element_to_tag(element: etree._Element) -> Tag: - if not isinstance(element.tag, str): + if isinstance(element.tag, etree._Comment): return XMLComment(element.tag.text) + if not isinstance(element.tag, str): + return Literal("") + tag_name = element.tag.split("}")[-1] raw_attributes = element.attrib