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

Method parse

src/bcf/bcf/xml_parser.py:64–72  ·  view source on GitHub ↗

Parse an XML file to an object. Args: xml: The XML file as bytes. clazz: The class to parse to.

(self, xml: bytes, clazz: type[T])

Source from the content-addressed store, hash-verified

62 self.serializer = build_serializer(self.context)
63
64 def parse(self, xml: bytes, clazz: type[T]) -> T:
65 """
66 Parse an XML file to an object.
67
68 Args:
69 xml: The XML file as bytes.
70 clazz: The class to parse to.
71 """
72 return self.parser.from_bytes(xml, clazz)
73
74 def serialize(self, obj: object, ns_map: Optional[dict[Optional[str], str]] = None) -> str:
75 """

Callers 12

_get_versionFunction · 0.45
versionMethod · 0.45
project_infoMethod · 0.45
extensionsMethod · 0.45
markupMethod · 0.45
_load_visinfoMethod · 0.45
versionMethod · 0.45
project_infoMethod · 0.45
extensionsMethod · 0.45
markupMethod · 0.45
_load_visinfoMethod · 0.45
loadMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected