I am getting all values by scanning the tags
list_values = []
tags = ['Created', 'Comments', 'Name']
for element in root.iter():
if element.tag not in tags:
continue
print(element.text)
list_values .append(element.text)
print(list_values)
Getting all values in one array like ['12/2/2018','aa','John','13/2/2018','aa2','Tim','12/4/2018','aa','John','13/2/2018','gg','Kim']
Have to insert all these values in SQL. I want output like
- ('12/2/2018','aa','John')
- ('13/2/2018','aa2','Tim')
- (12/4/2018','aa','John')