title: How to open this XML file to create dataframe in Python?
body: <p>Does anyone have a suggestion for the best way to open the xml data on the site below to put it in a dataframe (I prefer working with pandas) in python?  The file is on the "Data - XML (sdmx/zip)" link on this site:</p>
  
  <p><a href="http://www.federalreserve.gov/pubs/feds/2006/200628/200628abs.html">http://www.federalreserve.gov/pubs/feds/2006/200628/200628abs.html</a></p>
  
  <p>I've tried using the following by copying from <a href="http://timhomelab.blogspot.com/2014/01/how-to-read-xml-file-into-dataframe.html">http://timhomelab.blogspot.com/2014/01/how-to-read-xml-file-into-dataframe.html</a>, and it seems I'm getting close:</p>
  
  <pre><code>from lxml import objectify
  import pandas as pd
  
  path = 'feds200628.xml'
  xml = objectify.parse(open(path))
  root = xml.getroot()
  root.getchildren()[0].getchildren()
  df = pd.DataFrame(columns=('id', 'name'))
  
  for i in range(0,4):
      obj = root.getchildren()[i].getchildren()
      row = dict(zip(['id', 'name'], [obj[0].text, obj[1].text]))
      row_s = pd.Series(row)
      row_s.name = i
      df = df.append(row_s)
  </code></pre>
  
  <p>Still, I don't know enough about xml to get me the rest of the way. </p>
  
  <p>Any help would be awesome - I don't even <em>need</em> it to be in a dataframe, I just need to figure out how to parse this content in python somehow.</p>