Convert CSV To XML Online
|
|
How to convert CSV text files to XML documents?
- How CSV data is converted to XML format?
- How to prepare CSV files?
- How to load CSV data?
- How to change options?
- How to execute conversion?
- How to re-load CSV file from casched data?
- How to convert date format?
How CSV data is converted to XML format?
A CSV file consists of any number of records (or lines), separated by line breakers; each record consists of fields, separated by commas. Ideally, all records have an identical sequence of fields.
A CSV record is converted to an XML element and its fields can be converted to attributes of the element or child elements of it, depends on how the user wants. Here is an example of how a field in CSV record is converted to XML:
converted to an attribute:converted to a child element:<row name="John Doe"></row>
Return to the page top<row> <name>John Doe </name></row>
How to prepare CSV files?
You can use a spreadsheet program like Google Spreadsheets or Microsoft Excel to create and edit CSV files. You can include header fields (for example: name, email address, etc.) in the first record of the CSV file. XmlGrid has an option to use the field values of the first line in the CSV file as the element or attribute names. If your CSV file does not provide field headers, XmlGrid will create default field names for you. You can change the default field names after the CSV data is loaded. The following is a sample CSV file:
Return to the page topKey Words,Page Index CSV,2 comma separated values,1 XML document,3 attribute,5 schema,7 element,6 parser, 15 CSV to XML converter,21 XML to CSV converter,31
How to load CSV data?
You can copy and paste the CSV data into the input box and click the Submit button, or click the Open File button to select a file from your file system.
Return to the page topHow to change options?
To change the default options, simply click on the Options button. You will see the availble options, select the option desired.
Return to the page topHow to execute conversion?
To change the default options, simply click on the Options button. You will see the availble options, select the option desired.
Return to the page topHow to re-load CSV file from casched data?
After your CSV data is loaded, a copy of it is casched in your browser. You can always re-load it by clicking the icon.
Return to the page topHow to convert date format?
The standard XML Date element has the format "YYYY-MM-DD" where:
- YYYY indicates the year
- MM indicates the month
- DD indicates the day.