MCPcopy Create free account
hub / github.com/NTNU-IHB/PythonFMU / to_xml

Method to_xml

pythonfmu/variables.py:200–208  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

198 self.__attrs["start"] = value
199
200 def to_xml(self) -> Element:
201 attrib = dict()
202 for key, value in self.__attrs.items():
203 if value is not None:
204 attrib[key] = str(value)
205 parent = super().to_xml()
206 SubElement(parent, "String", attrib)
207
208 return parent

Callers 1

test_String_to_xmlFunction · 0.95

Calls 1

to_xmlMethod · 0.45

Tested by 1

test_String_to_xmlFunction · 0.76