cfdibills.io.read_xml
- cfdibills.io.read_xml(path: str) Union[cfdibills.schemas.cfdi33.CFDI33, cfdibills.schemas.cfdi40.CFDI40][source]
Reads a CFDI in a .xml and maps it to a pydantic object.
- Parameters
path (path to the xml file to read) –
- Returns
Pydantic object of the CFDI
- Return type
- Raises
InvalidCFDIError – If the xml is not in a valid format
UnsupportedCFDIError – If the CFDI version of the XML is not supported