title: Trying to extract xml element using python 2.7
body: <p>I am trying to extract the name elements under the sequence in xml files. I have pasted in the top of a sample xml to illustrate. With this I want to get the text from 01 Interview_been successful through mentorship and write it to a file. There are multiple sequence tags in the xml and I am trying to figure out how to go through it and extract it. I have tried to figure out how to use xml.etree and xml.dom.minidom but I can't seem to wrap my brain around it. I was able to get all of the id values from the sequence tags but not the name elements. I'm pasting in my code before the xml.</p>
  
  <pre><code>from xml.etree import ElementTree
  
  
  file = open("xmldump.txt", "r")
  filedata = file.read()
  file.close()
  
  with open('test.xml', 'rt') as f:
      tree = ElementTree.parse(f)
  
  for node in tree.iter('name'):
      sequenceid = node.attrib.get('name')
      print '  %s' % (sequenceid)
      newLine = sequenceid + "\n"
      file = open("xmldump.txt", "w")
      file.write(newLine)
      file.close()
  </code></pre>
  
  <p>Here is the XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE xmeml&gt;
  &lt;xmeml version="5"&gt;
  &lt;bin&gt;
  &lt;uuid&gt;0F5D72FA-54E4-4DE8-81D7-CC33F5C43836&lt;/uuid&gt;
  &lt;updatebehavior&gt;add&lt;/updatebehavior&gt;
  &lt;name&gt;Logged&lt;/name&gt;
  &lt;children&gt;
      &lt;sequence id="01 Interview_been successful through mentorship"&gt;
          &lt;uuid&gt;12FB944D-83EA-4527-9A54-2130A42E3A06&lt;/uuid&gt;
          &lt;updatebehavior&gt;add&lt;/updatebehavior&gt;
          &lt;name&gt;01 Interview_been successful through mentorship&lt;/name&gt;
          &lt;duration&gt;1195&lt;/duration&gt;
          &lt;rate&gt;
              &lt;ntsc&gt;TRUE&lt;/ntsc&gt;
              &lt;timebase&gt;24&lt;/timebase&gt;
          &lt;/rate&gt;
          &lt;timecode&gt;
  </code></pre>