Given a valid XSD schema file is there a way to automatically generate an instance XML document from it in Python? I am looking for a very simple way to do that (without any extensive configuration capabilities). I can use lxml.etree
to later change the data in the document (be it a file or a string residing in the memory).
There are plenty of online tools (xsd2xml.com for example) that support this. When it comes to entries that offer a specific set of values (like xs:enumeration
) many of those tools blindly pick the first valid choice, which (in my case) is perfectly fine.