I'm looking for an elegant solution to transform CSV files based on specific template into hierarchical XML file in Node/Express server.
Eg : CSV of Type Template "Location"
Name,Lat,Lon,Timezone
name,lat,lon,timezone
should be transformed to something like the following:
<Location>
<Name>name<Name/>
<Address>
<Lat>lat</Lat>
<Lon>lon</Lon>
</Address>
<Timezone>timezone</Timezone>
</Location>
Few additional notes:
- This XML conforms to be a schema defined by an XSD.
- This is just a small sample of many template types