How to Import or Export CSV?
CSV (Comma-Separated Values) is a plain text format widely used for storing tabular data, while XML (Extensible Markup Language) is a very popular data exchange format in web development. In different application scenarios, you may need to convert data between CSV and XML.
XML For You supports converting CSV to XML format, and also supports exporting XML to CSV format.
- Click the "Upload" button in the sidebar and select CSV as the file type;
- Click the red dashed box and select your CSV file in the pop-up dialog;
- XML For You will automatically convert the CSV data to XML format and display it in the left editor, while the original CSV data will be displayed in the right editor.
CSV to XML Example
Input CSV file:
name,age,city
John,30,New York
Jane,25,London
Converted to XML (with header):
[
{
"name": "John",
"age": 30,
"city": "New York"
},
{
"name": "Jane",
"age": 25,
"city": "London"
}
]
XML to CSV
Exporting XML to CSV makes it easy to import data into spreadsheet software (such as Excel, Google Sheets) for further analysis and visualization.
XML For You supports converting XML to CSV format and downloading it locally.
- Paste the XML data into the left editor;
- Click the "Export" button in the sidebar and select CSV as the file type;
- Click the "Preview" button, and the converted CSV data will be displayed in the right editor;
- Click the "Download" button to save the XML data as a CSV file.
XML to CSV Example
Input XML data:
[
{
"product": "Laptop",
"price": 1200,
"in_stock": true
},
{
"product": "Mouse",
"price": 25,
"in_stock": false
}
]
Exported CSV file:
product,price,in_stock
Laptop,1200,true
Mouse,25,false