title: How to efficiently detect an XML schema without having the entire file in python
body: <p>I have a very large feed file that is sent as an XML document (5GB). What would be the fastest way to parse the structure of the main item node without previously knowing its structure? Is there a means in Python to do so 'on-the-fly' without having the complete xml loaded in memory? For example, what if I just saved the first 5MB of the file (by itself it would be invalid xml, as it wouldn't have ending tags) -- would there be a way to parse the schema from that?</p>
  
  <hr>
  
  <p><strong>Update:</strong> I've included an example XML fragment here: <a href="https://hastebin.com/uyalicihow.xml" rel="nofollow noreferrer">https://hastebin.com/uyalicihow.xml</a>. I'm looking to extract something like a dataframe (or list or whatever other data structure you want to use) similar to the following:</p>
  
  <pre><code>Items/Item/Main/Platform       Items/Item/Info/Name
  iTunes                         Chuck Versus First Class
  iTunes                         Chuck Versus Bo
  </code></pre>
  
  <p>How could this be done? I've added a bounty to encourage answers here.</p>