xml2csv
xml2csv copied to clipboard
Issue with 'item-name' arg
An exception is thrown when trying to use the binary jar file agains an xml doc. Command run was as follows:
$ java -jar xml2csv-1.1.0.jar --columns Weakness,Description,Relationships,Relationship,Weakness_Ordinalities,Applicable_Platforms,Time_of_Introduction,Common_Consequences,Mitigation,Potential_Mitigations,Causal_Nature --input ../Documents/cweJuly2014.xml --output ../Documents/cweJuly2014out.csv --item-name Weaknesses Exception in thread "main" java.lang.RuntimeException: Unsupported command line argument: --item-name at com.fordfrog.xml2csv.Main.main(Main.java:108)
Weaknesses is the XPath element that is used. Tried using both just the word and the dbl forward slash before it. Reviewed LN 108 in the Main java class and didn't get an idea on how the error had and issue with the syntax of the command.
I encountered the exact same issue, based on adapting the sample invocation from the documentation. When I simply left off the final --item-name switch and its argument, this utility sorted out for itself where my preferred fields were located and easily produced the intended output.
sorry for late response, anyway, in the current code the exception is defined on line 170 but this one is thrown from line 108 so the jar is not from the latest code it seems.