I have following toy example code to read an xml using pandas
xml = '''<?xml version='1.0' encoding='utf-8'?>
<data>
<d>10</d>
<d>20</d>
<d>11</d>
<d>2</d>
<d>5</d>
</data>'''
import pandas as pd
df = pd.read_xml(xml,xpath="//data")
Result
>>> df
d
0 5
It seems it only reads the last data item.
Expected result
However I expect the following DataFrame as result:
>>> df
d
0 10
1 20
2 11
3 2
4 5
Question
Is it possible to read all the d tags in a single DataFrame using pd.read_xml?