title: Python convert xml to list
body: <p>I have the following xml dataset:</p>
  
  <pre><code>&lt;cnode desc="" name="xyz"&gt; 
    &lt;pnode name="word1"/&gt; 
    &lt;pnode name="word2"/&gt;
    &lt;pnode name="word3"/&gt;
    ...
  &lt;cnode desc="" name="abc"&gt; 
    &lt;pnode name="word4"/&gt; 
    &lt;pnode name="word5"/&gt;
    &lt;pnode name="word6"/&gt;
    ...
  </code></pre>
  
  <p>I want to get a list of all words after the name='xyz' and 'abc' respectively, e.g. xyz=[word1, word2, word3,...] and abc=[word4, word5, word6, ...]</p>
  
  <p>I tried the follwing solution:</p>
  
  <pre><code>import xml.etree.ElementTree as etree
  xyz=[]
  abc=[]
  
  tree = etree.parse('data.xml')
  root = tree.getroot()
  
  for child in root:
      words.append(child.findall(?!))
  print(words)
  </code></pre>
  
  <p>But I can't figure out how to reference to the parent with name=xyz and then extract the words of the children.</p>
  
  <p>Thanks for your help!!</p>