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])
| 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 | """ |
no outgoing calls
no test coverage detected