On this Page
CsvToXml Filter (Script-based)
Comma separated values (or tab or space or whatever delimiter) to .XML. The CsvToXml.wjs script is included in the installation. It has a whole slew of parameters which are described in comments at the bottom of the file.
Often this script can be used as is. In fact if a data file has a .csv extension and no filter is specified, then this filter will be applied automatically.
However, if you have some special processing needs, it's probably best to take a copy of this script and make some code edits.