title: Python XML parsing from website
body: <p>I am trying to Parse from a website. I am stuck. I will provide the XML below. It is coming from a webiste. I have two questions. What is the best way to read xml from a website, and then I am having trouble digging into the xml to get the rate I need.</p>
  
  <p>The figure I need back is Base:OBS_VALUE 0.12</p>
  
  <p>What I have so far:</p>
  
  <pre><code>from xml.dom import minidom
  import urllib
  
  
  document = ('http://www.newyorkfed.org/markets/omo/dmm/fftoXML.cfm?type=daily''r')
  web = urllib.urlopen(document)
  get_web = web.read()
  xmldoc = minidom.parseString(document)
  
  ff_DataSet = xmldoc.getElementsByTagName('ff:DataSet')[0]
  
  ff_series = ff_DataSet.getElementsByTagName('ff:Series')[0]
  
  for line in ff_series:
      price = line.getElementsByTagName('base:OBS_VALUE')[0].firstChild.data
      print(price)
  </code></pre>
  
  <p>XML code from webiste:</p>
  
  <pre><code>-&lt;Header&gt; &lt;ID&gt;FFD&lt;/ID&gt;
   &lt;Test&gt;false&lt;/Test&gt; 
   &lt;Name xml:lang="en"&gt;Federal Funds daily averages&lt;/Name&gt; &lt;Prepared&gt;2013-05-08&lt;/Prepared&gt;
   &lt;Sender id="FRBNY"&gt; &lt;Name xml:lang="en"&gt;Federal Reserve Bank of New York&lt;/Name&gt; 
  &lt;Contact&gt;   
  &lt;Name xml:lang="en"&gt;Public Information Web Team&lt;/Name&gt; &lt;Email&gt;ny.piwebteam@ny.frb.org&lt;/Email&gt;  
  &lt;/Contact&gt; 
  &lt;/Sender&gt; 
  &lt;!--ReportingBegin&gt;&lt;/ReportingBegin--&gt;
  &lt;/Header&gt; 
  &lt;ff:DataSet&gt; -&lt;ff:Series TIME_FORMAT="P1D" DISCLAIMER="G" FF_METHOD="D" DECIMALS="2" AVAILABILITY="A"&gt; 
  &lt;ffbase:Key&gt; 
  &lt;base:FREQ&gt;D&lt;/base:FREQ&gt; 
  &lt;base:RATE&gt;FF&lt;/base:RATE&gt;
  &lt;base:MATURITY&gt;O&lt;/base:MATURITY&gt; 
  &lt;ffbase:FF_SCOPE&gt;D&lt;/ffbase:FF_SCOPE&gt; 
  &lt;/ffbase:Key&gt; 
  &lt;ff:Obs OBS_CONF="F" OBS_STATUS="A"&gt;
  &lt;base:TIME_PERIOD&gt;2013-05-07&lt;/base:TIME_PERIOD&gt;
  &lt;base:OBS_VALUE&gt;0.12&lt;/base:OBS_VALUE&gt;
  </code></pre>