File tree 1 file changed +4
-2
lines changed
Scripts/Miscellaneous/xml2csv
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 6
6
xmlPath = ""
7
7
csvPath = ""
8
8
9
+ # validated the ammout of args passed from the command line, so I could get the path from both files before starting the script
10
+
9
11
if len (argv ) == 1 :
10
12
xmlPath = input ("please enter the path to your XML file: " )
11
13
csvPath = input ("please enter the path to your CSV file: " )
18
20
19
21
print ("started to convert your file..." )
20
22
21
- # from line 27 to 31
23
+ # from line 29 to 33
22
24
# I read the file from the xmlPath variable, and got the dictory from parseXML
23
25
# After that I got the first key from the dict (asumming the user passed a single xml liked the test.xml file)
24
26
# After that I got the list of nodes inside the "root"
35
37
csvWriter = CSVWriter (csvFile )
36
38
37
39
38
- # from line 44 to 51
40
+ # from line 46 to 53
39
41
# I iterated over all the items on the child of the file root
40
42
# After that i made the variable item into a real dict so I could use
41
43
# .keys and .values, the keys for the header row
You can’t perform that action at this time.
0 commit comments