Finding data on XML using Python's LXML
Currently, you are overlooking one of the advantages in using lxml with its fully compilant W3C XPath 1.0 (even XSLT 1.0) language modules. 

Right now, your code really follows the syntax of Python's built-in etree, without any xpath() calls that can run dynamic parsing off node names. 

Below iterates through all &lt;basic&gt; and &lt;expert&gt; tags and retrieves their child &lt;name&gt; and &lt;email&gt; all in one loop or list comprehension. And to retrieve their position we count their preceding siblings with count(preceding-sibling::*).

from lxml import etree

myXML = "data.xml"
tree = etree.parse(myXML)

user = []

# FOR LOOP
for i in tree.xpath("//*[name()='basic' or name()='expert']"):
    user.append([i.xpath("count(name/preceding-sibling::*)"), 
                 i.find("name").text, 
                 i.xpath("count(email/preceding-sibling::*)"), 
                 i.find("email").text])        
print(user)
# [[0.0, 'f.bar', 1.0, 'foobar@me.com'], 
#  [0.0, 'm.bob', 3.0, 'm.bob@email.com'], 
#  [0.0, 'm.bab', 3.0, 'm.bab@email.com']]


# LIST COMPREHENSION
user = [[i.xpath("count(name/preceding-sibling::*)"), 
         i.find("name").text, 
         i.xpath("count(email/preceding-sibling::*)"), 
         i.find("email").text] 
        for i in tree.xpath("//*[name()='basic' or name()='expert']")]

print(user)
# [[0.0, 'f.bar', 1.0, 'foobar@me.com'], 
#  [0.0, 'm.bob', 3.0, 'm.bob@email.com'], 
#  [0.0, 'm.bab', 3.0, 'm.bab@email.com']]