Revision [313]

This is an old revision of CommandCsv2xml made by DavidLee on 2008-12-09 13:29:30.


Command csv2xml


csv2xml converts a csv file to an xml file


csv2xml [-root rootname] [-row rowname] [-col colname] [-delim delimchar] [-encoding encoding] [-header] [-attr] [csvfile]


-root rootname use "rootname" as the root element name, default "root"
-row rowname use "rowname" as each row's element name, default "row"
-col colname use "colname" as each column's element name (or for attribute normal format, the attribute prefix)
-delim delimchar deliminate columns with delimchar, default ","
-encoding encoding read csv file in encoding (default "cp1252")
-header read 1 row from the csv file and use as column names (element or attribute)
-attr Output in attribute normal format (each column is an attribute), default row normal format
csvfile Name of the csv file to convert, otherwise stdin. Default "-" (stdin)


$ echo foo,bar | csv2xml

Return Value

Returns 0 if the conversion is successful


There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki