title: Fastest way to parse XML in Python
body: <p>I'm trying to find the qickest way to parse sensor data from a smartphone for a realtime application. The Format looks like this:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' standalone='yes' ?&gt;
  &lt;NodeId&gt;0&lt;/NodeId&gt;
  &lt;Accelerometer&gt;
      &lt;Accelerometer1&gt;-.1875240802764893&lt;/Accelerometer1&gt;
      &lt;Accelerometer2&gt;4.6734819412231445&lt;/Accelerometer2&gt;
      &lt;Accelerometer3&gt;8.312667846679688&lt;/Accelerometer3&gt;
  &lt;/Accelerometer&gt;
  &lt;Gyroscope&gt;
      &lt;Gyroscope1&gt;-0.10551923513412476&lt;/Gyroscope1&gt;
      &lt;Gyroscope2&gt;0.009592439979314804&lt;/Gyroscope2&gt;
      &lt;Gyroscope3&gt;0.019185146316885948&lt;/Gyroscope3&gt;
  &lt;/Gyroscope&gt;
  &lt;Gravity&gt;
      &lt;Gravity1&gt;-1.2976515293121338&lt;/Gravity1&gt;
      &lt;Gravity2&gt;3.672762393951416&lt;/Gravity2&gt;
      &lt;Gravity3&gt;9.003327369689941&lt;/Gravity3&gt;
  &lt;/Gravity&gt;
  &lt;TimeStamp&gt;1377767599250&lt;/TimeStamp&gt;
  </code></pre>
  
  <p>The available sensor data might change depending on the phone. But once the connection is established the structure of the packages won't change, so maybe parts of the parsing could be skipped.</p>