title: extracting a set of elements from xml schema
body: <p>how can I use Python code to extract the red part <a href="https://i.stack.imgur.com/7NXJX.png" rel="nofollow noreferrer">of this image</a>?
  More specifically, I need the "name" attribute of each xs:element, like PURPOSE_CD, TYPE_CD and so on
  I tried using this code, but it doesn't work</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  for item in root.findall('NewDataSet'):
    print('found')
    item_text=item.findall("xs:element").text
    item_name=item.get('name')
    print(item_name)
  </code></pre>
  
  <p>Thanks a lot</p>