Closed Awerito closed 3 months ago
I use this schema here: https://www.leychile.cl/esquemas/EsquemaIntercambioNorma-v1-0.xsd
xsdata EsquemaIntercambioNorma-v1-0.xsd
I can't convert the result of xsdata:
"""main.py""" import httpx from xsdata_pydantic.bindings import XmlParser from generated.esquema_intercambio_norma_v1_0 import Norma def get_norma(id_norma: int) -> Norma: url = "https://www.leychile.cl/Consulta/obtxml?opt=7&idNorma={}".format(id_norma) response = httpx.get(url) response.raise_for_status() parser = XmlParser() norma = parser.from_string(response.text, Norma) return norma if __name__ == "__main__": norma = get_norma(206396) # Works fine norma = get_norma(194194) # Throws error for the aem:ArchivoBinario tag
Please some help :heart:
I use this schema here: https://www.leychile.cl/esquemas/EsquemaIntercambioNorma-v1-0.xsd
I can't convert the result of xsdata:
Please some help :heart: