Generate multiple sample XML files
Posted: Thu Dec 20, 2018 8:00 pm
Hi,
I'm working on an XML schema (XSD) distributed over various files, where some schema files define one or more global elements. I'm now in the process of generating sample XML files and I want to generate at least one file per root element. I have found no way but to manually pick a single root element, generate the sample XML file, and then continue with the next element.
I wonder if this can be facilitated by using an approach that would allow to select multiple root elements, for instance one similar to selecting files when importing into an Eclipse project from the file system, with a left column listing the schema files (preferably only those containing global elements) and a right column listing the global elements of the respective schema file. Check boxes would allow to select/deselect a file (and its global elements) and individual elements, and of course there would be "clear selection"/"select all" buttons or the like. The respective element name would be used as the name of the output XML file, with optional variables to insert a timestamp etc., and there would probably have to be an "overwrite existing files"/"add file count to name" choice.
I see the are still questions as regards the selction of eligible schema files, for instance considering master XML schema, open XML schema files, the current and possibly included/imported schemata etc. which I honestly haven't given much thought and which you are far more qualified to answer.
Best regards, and season's greetings,
Michael
I'm working on an XML schema (XSD) distributed over various files, where some schema files define one or more global elements. I'm now in the process of generating sample XML files and I want to generate at least one file per root element. I have found no way but to manually pick a single root element, generate the sample XML file, and then continue with the next element.
I wonder if this can be facilitated by using an approach that would allow to select multiple root elements, for instance one similar to selecting files when importing into an Eclipse project from the file system, with a left column listing the schema files (preferably only those containing global elements) and a right column listing the global elements of the respective schema file. Check boxes would allow to select/deselect a file (and its global elements) and individual elements, and of course there would be "clear selection"/"select all" buttons or the like. The respective element name would be used as the name of the output XML file, with optional variables to insert a timestamp etc., and there would probably have to be an "overwrite existing files"/"add file count to name" choice.
I see the are still questions as regards the selction of eligible schema files, for instance considering master XML schema, open XML schema files, the current and possibly included/imported schemata etc. which I honestly haven't given much thought and which you are far more qualified to answer.
Best regards, and season's greetings,
Michael