[Python] Is there a way to type in data into a table (excel/csv) to export to xml, given a...

Discussão em 'Python' iniciado por Stack, Outubro 23, 2024.

  1. Stack

    Stack Membro Participativo

    I am tasked with developing a solution for reporting purposes and the expected end result is an xml. I have been given an xsd (xml schema) and from my understanding, the output xml should correspond to the xsd for it to be usable by the end system for some sort of ETL. I also have an example xml file (provided by the regulatory authority). The provided files are available at https://uif.bancaditalia.it/pubblicazioni/avvisi/2024/regolamento-2878-2023/TRU_XML.zip

    The ideal solution would look like:

    1. an excel sheet/csv that a non-technical user can access to add data in predefined columns,
    2. the sheet gets converted to xml conforming to the xsd schema

    For it to happen, I think my question should be How to create an editable document outline based on a given xsd, and how to make the document capable of future edits. I'd appreciate any hints as to which tools to try, and if there is something wrong with my understanding of the process.

    Thanks in advance

    to understand the example xml structure, I have tried opening it in excel and excel auto generated a schema for it. However, it is neither editable nor exportable.

    I have also tried creating an web app in flask that creates a HTML form from the xsd, but the problem here is that it doesn't recognise the schema to its depths; rather giving me just 3 outer elements. Attached is an image flask web app

    I haven't worked with xml before (I work as a data analyst and usually deal with sql and power bi) and have some basic knowledge of programming in python - so I had asked chatgpt to create the web app shown above.

    Continue reading...

Compartilhe esta Página