Having the following xml,
<markets xmlns:cap="URI">
<us>
<summary>
<index>NASDAQ</index>
<last>34,000</last>
<cap:change>-2.4</cap:change>
</summary>
</us>
</markets>
Let's assume I've an Element that points to NASDAQ
,
import xml.etree.ElementTree as ET
markets = ET.parse('markets.xml')
// some processing here
index = # pointing to `NASDAQ` element here
how can I get the element full path as markets.us.summary.index
?