xml2csv

command module
v0.0.0-...-3bb1dbf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 11 Imported by: 0

README

xml2csv

XML is a pain, and the existing Go libraries for dealing with it are a sad lot.

Here we convert .xml to .csv (comma separated values) for sane further processing.

This code will parse an XML file on stdin, and write csv to stdout. No schema required. You do not need to create structs in Go first; no data-specific structs are involved. There is just one tag struct used to process the .xml, and everything ends up in a tree of them.

It was written for a specific need, and is not polished at all. It assumes that the repeated records of interest are at depth one, and turns each of these into a row in the CSV.

Feel free to fork and adapt it to your own needs. I'll probably not do further work on it, but maybe it can be the starting point for something of yours.

Copyright (c) 2023 Jason E. Aten, Ph.D.

License: MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL