You did not specifiy what exactly you whant to use so i recommend lxml for python. For getting the values you whant you have more possibiltys:
With a loop:
from lxml import etree
tree = etree.parse('XmlTest.xml')
root = tree.getroot()
text = []
for element in root:
text.append(element.get('D',None))
for child in element:
for grandchild in child:
text.append(grandchild.text)
print(text)
Output:
['14/11/2017', 'The quick', 'brown', 'fox', '14/11/2017', 'The lazy', 'fox']
With xpath:
from lxml import etree
tree = etree.parse('XmlTest.xml')
root = tree.getroot()
D = root.xpath("./H")
F = root.xpath(".//F")
for each in D:
print(each.get('D',None))
for each in F:
print(each.text)
Output:
14/11/2017
14/11/2017
The quick
brown
fox
The lazy
fox
Both have there own advantages but give you a good starting point.
I recommend the xpath since it gives you more freedom when values are
missing.