Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m looking for a library that will transform text files in one format into tex

ID: 660223 • Letter: I

Question

I'm looking for a library that will transform text files in one format into text files in another format. Example formats are XLS, XML, JSON, TSV, CSV, and various forms of fixed field length files.

I have a standard input format and a standard output format. Often, input files are in a different format and need to be transformed. Occasionally I'll also need to transform the output file before it can be used. These seems like a fairly common use case, so I don't want to reinvent the wheel if I can avoid it. Either this isn't as common as I think it is, or my Google-fu is failing me on this one. Most of the results are either online converters or single source/target converters (only CSV to JSON).

C# is preferable, although command-line option that I could invoke would work too. Open source or free is preferable, but all options are welcome.

P.S. I am aware that several ETL solutions do this sort of thing. I'm not looking for SSIS or Talend. I'm looking for a library or at least a command-line tool that I can invoke programmatically.

Explanation / Answer

For transforming XML, you should simply use any implementation of XSLT. (If you have a MS system, "msxsl" is already on your disk)

It should take only a few lines of XSLT to product equivalent JSON. XSLT won't work on JSON but what it does with XML is pretty spectacular., and if that isn't enough you can add some JavaScript goo to help.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote