I have the following xml format.
I can get the title and link easily enough, but am getting stuck on how I can get the img src out of the content.
<feed>
<entry>
<title>A title</title>
<link rel="alternate" type="text/html" href="https://url.html"/>
<content> <figure> <img alt="text" src="https://image.jpg" /> <p>some text</p></content>
</entry>
</feed>
for entry in root.findall('{http://www.w3.org/2005/Atom}entry'):
title = entry.find('{http://www.w3.org/2005/Atom}title').text
link = entry.find('{http://www.w3.org/2005/Atom}link').attrib['href']
img_url = entry.find('{http://www.w3.org/2005/Atom}src')
arr.append([title, link, img_url])
print(title, link)
return render(request, 'madxmlparser.html', {'arr':arr})
See below
output