Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 'item-name' arg #5

Open
tonyuv opened this issue Jul 5, 2014 · 3 comments
Open

Issue with 'item-name' arg #5

tonyuv opened this issue Jul 5, 2014 · 3 comments

Comments

@tonyuv
Copy link

tonyuv commented Jul 5, 2014

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)

@tonyuv
Copy link
Author

tonyuv commented Jul 5, 2014

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.

@hesco
Copy link

hesco commented Nov 13, 2020

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.

@fordfrog
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants