<root>
<article>
<front>
<body>
<back>
<sec id="sec7" sec-type="funding">
<title>Funding</title>
<p>This work was supported by the NIH</p>
</sec>
</back>
I have an XML file of scientific journal metadata and am trying to extract just the funding information for each article. I need the info contained within the p tag. While the "sec id" varies between article, the "sec-type" is always "funding".
I have been trying to do this in Python3 using Element Tree.
import xml.etree.ElementTree as ET
tree = ET.parse(journals.xml)
root = tree.getroot()
for title in root.iter("title"):
ET.dump(title)
Any help would be greatly appreciated!