xml2csv
Package: WA2L/WinTools 1.2.08
Section: Library Commands (3)
Updated: 16 April 2021
Index
Return to Main Contents
NAME
SYNOPSIS
WA2LWinTools/lib/xml2csv
[
-h
]
xml2csv
[
{
-l fieldname
|
-k fieldlist
|
-i fieldlist
|
-e emptydata
|
-s separator
}
]
(
sourcefile
|
URL
)
destinationfile
AVAILABILITY
WA2L/WinTools
DESCRIPTION
Command line XML to CSV converter.
xml2csv
is command line tool for converting data from XML schema to CSV.
The tool has many command line options.
The software is platform independent and was written in Java language.
Features:
- -
-
Converts XML schema to CSV file
- -
-
Can deal with filenames and urls
- -
-
Automatically detects loops (repeated elements) in XML used for splitting data to rows
- -
-
Allows to override name of the loop/repeated field
- -
-
Allows to keep only specific tags/fields
- -
-
Allows to ignore specific tags/fields
- -
-
Allows to set values for empty data and CSV separator
- -
-
Supports distinct option
- -
-
Platform Independent
OPTIONS
- -h
-
usage message.
- -l fieldname
-
set the name of the field that repeats in XML schema.
- -k fieldlist
-
comma separated list of fields to be kept.
- -i fieldlist
-
comma separated list of fields to be ignored.
- -e emptydata
-
data to be used for empty fields.
- -s separator
-
field separator in
CSV
file.
- sourcefile | URL
-
file or url
to read the
XML
data from.
- destinationfile
-
CSV
file to write the data to.
ENVIRONMENT
-
EXIT STATUS
- 0
-
always.
FILES
-
EXAMPLES
Example usage of the
xml2csv
command:
xml2csv -l field -i city,country -d -s "," data.xml data.csv
xml2csv -k "name, surname" data.xml data.csv
xml2csv http://www.example.com/data.xml data.csv
xml2csv data.xml data.csv
SEE ALSO
wintoolsintro(1),
print_list(3),
select_columns(3),
xml2json(3),
https://code.google.com/archive/p/xml2csv-conv
NOTES
parts of the documentation are extracted from the commands usage
message and the authors web page
(https://code.google.com/archive/p/xml2csv-conv)
and were integrated into WA2L/WinTools.
BUGS
-
AUTHOR
xml2csv-conv was developed by an unknown author
(https://code.google.com/archive/p/xml2csv-conv)
and integrated as xml2csv into WA2L/WinTools by
Christian Walther. Send suggestions
and bug reports regarding to the integration to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2021
by Christian Walther
This is free software; see
WA2LWinTools/man/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 16:33:25 GMT, September 14, 2024