set text
This commit is contained in:
parent
025db00339
commit
389e6313e3
1 changed files with 4 additions and 5 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
from typing import Dict
|
|
||||||
|
|
||||||
import xml.etree.ElementTree as et
|
import xml.etree.ElementTree as et
|
||||||
|
from typing import Dict
|
||||||
|
|
||||||
|
|
||||||
def _to_max_3_byte_utf8_char(char: str) -> str:
|
def _to_max_3_byte_utf8_char(char: str) -> str:
|
||||||
|
|
@ -55,7 +54,7 @@ def to_xml(nfo_dict: Dict[str, str], nfo_root: str) -> bytes:
|
||||||
"""
|
"""
|
||||||
xml_root = et.Element(nfo_root)
|
xml_root = et.Element(nfo_root)
|
||||||
for key, value in nfo_dict.items():
|
for key, value in nfo_dict.items():
|
||||||
et.SubElement(xml_root, value)
|
sub_element = et.SubElement(xml_root, key)
|
||||||
|
sub_element.text = value
|
||||||
return et.tostring(element=xml_root, encoding='utf-8', xml_declaration=True)
|
|
||||||
|
|
||||||
|
return et.tostring(element=xml_root, encoding="utf-8", xml_declaration=True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue