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.

The figure I need back is Base:OBS_VALUE 0.12

What I have so far:

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)

XML code from webiste:

-<Header> <ID>FFD</ID>
 <Test>false</Test> 
 <Name xml:lang="en">Federal Funds daily averages</Name> <Prepared>2013-05-08</Prepared>
 <Sender id="FRBNY"> <Name xml:lang="en">Federal Reserve Bank of New York</Name> 
<Contact>   
<Name xml:lang="en">Public Information Web Team</Name> <Email>ny.piwebteam@ny.frb.org</Email>  
</Contact> 
</Sender> 
<!--ReportingBegin></ReportingBegin-->
</Header> 
<ff:DataSet> -<ff:Series TIME_FORMAT="P1D" DISCLAIMER="G" FF_METHOD="D" DECIMALS="2" AVAILABILITY="A"> 
<ffbase:Key> 
<base:FREQ>D</base:FREQ> 
<base:RATE>FF</base:RATE>
<base:MATURITY>O</base:MATURITY> 
<ffbase:FF_SCOPE>D</ffbase:FF_SCOPE> 
</ffbase:Key> 
<ff:Obs OBS_CONF="F" OBS_STATUS="A">
<base:TIME_PERIOD>2013-05-07</base:TIME_PERIOD>
<base:OBS_VALUE>0.12</base:OBS_VALUE>
Edit
Report