Please help, Python beginner,
after getting all the data from xml,
data_list = xmlTree.findall(‘.//data’)
e.g here I get 10 rows
Now, I need to keep only a few rows for which attribute ‘name’ values match with elements of another list (inputID) with three IDs inside.
e.g. remains only 3 rows whose name attribute match with the list elements
Thank you.
You can use a for loop to iterate over each element, then decide if each element should be removed. I used the Python doc ElementTree XML API for reference.