Reputation: 177
I want to design a flexible way to add parsing logic for CSV files without using Java or C#.
We know that XSLT can be used to manipulating XML files.
Is there a equivalent technology for CSV files?
Upvotes: 2
Views: 98
Reputation: 261
I've been using scala-csv for a project I've been working on and I haven't had much trouble with it yet. It saved me the trouble of writing a bunch of regular expressions, and if that's what you're looking for, it should help you out.
https://github.com/tototoshi/scala-csv
Upvotes: 0
Reputation: 65851
One option would be to transform the CSV into XML and then use XSLT to transform that.
Here is an XSLT transform that seems to try to do that.
Upvotes: 0
Reputation: 111686
No, there is no XSLT of CSV, because CSV is fundamentally simpler than XML.
Mapping between general tree structures is intrinsically more difficult than mapping between sets of fixed length tuples. XSLT is a tool that helps meets the challenge for general tree structures. Mapping between CSV is much easier and typically is done in an ad hoc manner directly in a general purpose programming language.
Upvotes: 1