A valid XML input contains a root element with repeating child elements. Each repeating element represents a row, and its child elements become column headers. For example:
<data>
<item>
<os>Windows</os>
<version>11</version>
<architecture>x64</architecture>
</item>
<item>
<os>macOS</os>
<version>Tahoe</version>
<architecture>ARM64</architecture>
</item>
</data>The output is an Excel file (.xlsx) with column headers derived from XML element names. Each repeating element becomes a row. The output of the above XML will be:
| os | version | architecture |
|---|---|---|
| Windows | 11 | x64 |
| macOS | Tahoe | ARM64 |
Note: You need to click the "Download" button to download the Excel file, as Excel is a binary format that cannot be copied directly.
If your XML has empty elements, these values will be converted to empty cells in the Excel output. For example:
<data>
<item>
<browser>Firefox</browser>
<engine></engine>
<license />
</item>
</data>produces an Excel file as:
| browser | engine | license |
|---|---|---|
| Firefox |
The converter collects all unique element names from all items to create column headers. Missing elements in any item will be represented as empty cells. For example:
<data>
<item>
<language>Rust</language>
<paradigm>Systems</paradigm>
</item>
<item>
<language>Python</language>
<typing>Dynamic</typing>
</item>
</data>produces an Excel file as:
| language | paradigm | typing |
|---|---|---|
| Rust | Systems | |
| Python | Dynamic |
The tool flattens nested elements using dot notation for column headers. For example:
<data>
<server>
<name>nginx</name>
<config>
<port>80</port>
<ssl>true</ssl>
</config>
</server>
</data>produces columns like name, config.port, and config.ssl.
Note: For best results, use XML with a simple structure where repeating elements contain flat child elements.