MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / to_xml

Method to_xml

src/ifctester/ifctester/ids.py:162–165  ·  view source on GitHub ↗
(self, filepath="output.xml")

Source from the content-addressed store, hash-verified

160 return etree_tostring(get_schema().encode(self.asdict()), namespaces=ns)
161
162 def to_xml(self, filepath="output.xml"):
163 ET.register_namespace("", "http://standards.buildingsmart.org/IDS")
164 ET.ElementTree(get_schema().encode(self.asdict())).write(filepath, encoding="utf-8", xml_declaration=True)
165 return get_schema().is_valid(filepath)
166
167 def validate(
168 self, ifc_file: ifcopenshell.file, should_filter_version: bool = False, filepath: Optional[str] = None

Callers 3

test_saving_to_xmlMethod · 0.95
validateIDSFunction · 0.80

Calls 5

asdictMethod · 0.95
get_schemaFunction · 0.85
is_validMethod · 0.80
writeMethod · 0.45
encodeMethod · 0.45

Tested by 1

test_saving_to_xmlMethod · 0.76