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

Method to_xml

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

Source from the content-addressed store, hash-verified

174 self.__attrs["start"] = value
175
176 def to_xml(self) -> Element:
177 attrib = dict()
178 for key, value in self.__attrs.items():
179 if value is not None:
180 attrib[key] = str(value).lower()
181 parent = super().to_xml()
182 SubElement(parent, "Boolean", attrib)
183
184 return parent
185
186
187class String(ScalarVariable):

Callers 1

test_Boolean_to_xmlFunction · 0.95

Calls 1

to_xmlMethod · 0.45

Tested by 1

test_Boolean_to_xmlFunction · 0.76