parse data from xml using python 3
You can get the sets directly using https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.findall and xpath (like : 'node_a.node_b.etc.req_node') like shown below code... (also can access the comment text)
import xml.etree.ElementTree as ET
import pandas as pd
from matplotlib import pyplot as plt
tree = ET.fromstring("test.xml")
root = tree.getroot()
for elem in root.findall('./dos/partial/array/set/set/set'):
comment = elem.get('comment')
print(comment)
data = list()
for row in elem.findall('r'):
data.append(list(map(float, row.text.split())))
df = pd.DataFrame(data)
print(df)
df.plot()
plt.show()