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

Function ids_from_xml_string

src/ifctester/webapp/public/worker/api.py:186–193  ·  view source on GitHub ↗
(xml: str, validate: bool = False)

Source from the content-addressed store, hash-verified

184
185
186def ids_from_xml_string(xml: str, validate: bool = False) -> Ids:
187 try:
188 decode = get_schema().decode(
189 xml, strip_namespaces=True, namespaces={"": "http://standards.buildingsmart.org/IDS"}
190 )
191 except XMLSchemaValidationError as e:
192 raise IdsXmlValidationError(e, "Provided XML appears to be invalid. See details above.")
193 return Ids().parse(decode)

Callers 1

openIDSFunction · 0.85

Calls 5

get_schemaFunction · 0.90
IdsClass · 0.90
decodeMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected