Using the Python library xmlschema one can easily generate a dictionary representing the schema (similar to the Clojure library xelery)
{
"root": {
"multiplicity": [min, max],
"type": "RootType"
"name": "RootElement"
"elements": {
....
}
}
}
From this dictionary one can generate an Excel file using the Python library openpyxl (or docjure in Clojure).
For example, a schema of the form:
Root:
- Customers: List[Customer]
- Orders: List[Order]
Customer:
- CustomerId: str
- Name: str
- Address: Address
Order:
- CustomerId: str
- OrderId: str
- ShippingAddress: Address
Address:
- Street: str
- PostalCode: int
- City: str
can be mapped to an Excel Workbook with the following sheets:
Root
Field Name |
Value |
Customers |
Customers |
Orders |
Orders |
Customers
Field Name |
Value |
Value |
CustomerId |
ID1234 |
ID6789 |
Name |
John Smith |
Mary Jones |
Address |
Address |
Address |
Address
Field Name |
Value |
Value |
Street |
Sesame Street 12 |
Sesame Street 21 |
PostalCode |
12345 |
12345 |
City |
Metropolis |
Metropolis |
Orders
Analog to customers
Other possibilities
While for relatively simple schemas this can be useful (I implemented this mapping for a client that wanted to use Excel as a GUI for generating SOAP requests), the previous answers are correct. In general, Excel is not the right GUI for generating XML from a schema. There are ways to generate a GUI from an XML schema: