(xml: str, validate: bool = False)
| 184 | |
| 185 | |
| 186 | def 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) |
no test coverage detected