Convert CSV to XML
Configure CSV Headers to match
->try CSV Field Sequence
->try XSD Elements
Input CSV 1:
CustomerID,CompanyName,Country
ALFKI,Alfreds,Germany
BLAUS,Berglunds,Sweden
CACTU,Cactus,Argentina
Input CSV 2:
CustomerID,Country,CompanyName
ALFKI,Germany,Alfreds
BLAUS,Sweden,Berglunds
CACTU,Argentina,Cactus
Output XML Expected:
<?xml version='1.0' encoding='UTF-8'?>
<MT_Customer>
<data>
<row>
<CustomerID>ALFKI</CustomerID>
<CompanyName>Alfreds</CompanyName>
<Country>Germany</Country>
</row>
<row>
<CustomerID>BERGS</CustomerID>
<CompanyName>Berglunds</CompanyName>
<Country>Sweden</Country>
</row>
<row>
<CustomerID>CACTU</CustomerID>
<CompanyName>Cactus</CompanyName>
<Country>Argentina</Country>
</row>
</data>
</MT_Customer>
XSD File:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid Technologies Online Tools 1.0 (https://www.liquid-
technologies.com) -->
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="MT_Customer">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="data">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="row">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="CustomerID" type="xs:string" />
<xs:element minOccurs="0" name="CompanyName"
type="xs:string" />
<xs:element minOccurs="0" name="Country" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>