我正在使用这样的beautifulsoup4:
from bs4 import BeautifulSoup
xml_string = u"""<something><dcterms:valid><![CDATA[
start=2012-02-24T00:00:00Z
end=2030-12-30T00:00:00Z
scheme=W3C-DTF]]>
</dcterms:valid></something>"""
soup = BeautifulSoup(xml_string, 'xml')
soup.find('dcterms:valid') # returns None
soup.find('valid') # returns the dcterms:valid node
有没有办法在中指定命名空间,soup.find(tagname)
以便我可以准确地了解我要查找的内容?