A system asks you to supply data as XML, but what you have is a CSV. Many feeds, legacy imports and configuration formats still expect XML, and hand-tagging rows is slow and easy to get wrong, especially once you have to escape stray ampersands and angle brackets.
The short version: paste a CSV, name the elements, and copy the XML. The CSV to XML tool runs on your device, so nothing is uploaded.
How rows turn into XML
XML wraps your data in a tree. A single root element holds one element per row, and inside each row the column values appear as child tags named after the headers. This CSV:
name,qty
Tea,5
Coffee,12
becomes:
<rows>
<row>
<name>Tea</name>
<qty>5</qty>
</row>
<row>
<name>Coffee</name>
<qty>12</qty>
</row>
</rows>
You name the root (rows above) and the per-row element (row) yourself, so the output matches whatever the receiving system expects.
Tags or attributes
There are two common ways to write each value, and you can choose. As child tags, shown above, each value sits in its own element, which is readable and easy to extend later. As attributes, the same row collapses to <row name="Tea" qty="5"/>, which is more compact. Child tags are the default because they cope better with values that contain special characters or that you may want to nest further.
Why escaping matters
XML has reserved characters. An ampersand, a less-than sign or a quote mark inside a value will break the document unless it is written as an entity, so Tea & Co has to become Tea & Co. The conversion handles this for every value. It also fixes header names that are not legal XML tag names, such as one that starts with a number or contains a space, so the result always parses.
How to convert CSV to XML
Step 1: Add the CSV
Paste CSV text into the tool or drop in a file. The header row supplies the tag names.
Step 2: Set the names and style
Name the root and row elements. Choose child tags or attributes for the values.
Step 3: Copy or download
Copy the XML or download it as a file, ready for a feed, an API or an import.
Related conversions
If the target is a database rather than an XML consumer, the CSV to SQL tool generates INSERT statements instead. And to go from a spreadsheet to a key-value structure for an app, the Excel to JSON converter produces an array of row objects.