Учитывая XML-файл, я хочу отобразить в своем браузере таблицу журнала с указанием года и другую таблицу, содержащую конференции (название книги), также с указанием года.
ниже, если формат файла XML
<dblpperson>
<r>
<article>
<author orcid="0000-0001-6062-7524">Meinard</author>
<author>Bryan Pardo</author><author>Gautham</author>
<author>Vesa</author>
<title>Recent Advances in Music Signal Processing [From the Guest
Editors].</title>
<year>2019</year>
<journal>IEEE Signal Process. Mag.</journal>
<ee>https://doi.org/10.1109/MSP.2018.2876190</ee>
</article>
</r>
<r>
<article>
<author>Müller</author>
<author>Vesa</author>
<author>Patricio</author>
<title>Automatic Drum Transcription.</title>
<year>2018</year>
<booktitle>ICASSP</booktitle>
<ee>https://doi.org/10.1109/MSP.2018.2876190</ee>
</article>
</r>
...
ниже это то, что я пробовал до сих пор
@bottle.route("/authors/<name>/synthesis", method='POST')
...
list_of_journals = []
list_of_conf = []
root = ET.fromstring(data.content)
for publication in root.findall('r'):
for tags in publication:
#separate journals from conferences
attribute = tags.attrib['key'].split('/')
attribute = attribute[0]
#print(type(attribute))
if attribute == 'journals':
titre_j = tags.find('title').text
...
list_of_journals.append([titre_j, année_j, journal_j])
elif attribute == 'conf':
titre_c = tags.find('title').text
...
list_of_conf.append([titre_c, année_c, journal_c])
table = """
<table style="width:80%">
<tr>
<th>Journal</th>
<th>Year</th>
</tr>
<tr>
<td> """ + str(list_of_journals[0][0]) + """</td>
...