title: Accessing non tree structured xml data in python
body: <p>I have several xml files that I want to parse in python. I am aware of the ElementTree package in python, however my xml files aren't stored in a tree like structure. Below is an example</p>
  
  <pre><code>&lt;tag1 attribute1="at1" attribute2="at2"&gt;My files are text that I annotated with a tool 
  to create these xml files.&lt;/tag1&gt;
  Some parts of the text are enclosed in an xml tag, whereas others are not. 
  &lt;tag1 attribute1="at1" attribute2="at2"&gt;&lt;tag2 attribute3="at3" attribute4="at4"&gt;Some
  are even enclosed in multiple tags.&lt;/tag1&gt;&lt;/tag2&gt;
  And some have overlapping tags:
  &lt;tag1 attribute1="at1" attribute2="at2"&gt;This is an example sentence
  &lt;tag3 attribute5="at5"&gt;containing a nested example sentence&lt;/tag3&gt;&lt;/tag1&gt;
  </code></pre>
  
  <p>Whenever I use an ElementTree like function to parse the file, I can only access the very first tag. I am looking for a way to parse all the tags and don't want a tree like structure. Any help is greatly appreciated.</p>