擅长:python、mysql、java
<p>如果你安装了BeautifulSoup,类似的东西应该可以工作</p>
<pre><code>from bs4 import BeautifulSoup
xml = '''<entry_list version="1.0">
<entry id="polycystic kidney disease">
<ew>polycystic kidney disease</ew>
<hw>polycystic kidney disease</hw>
<fl>noun</fl>
<def>
<sensb>
<sens>
<dt> Blah blah blah
</dt>
</sens>
</sensb>
</def>
</entry>
</entry_list>'''
parsed = BeautifulSoup(xml)
for dt in parsed.findAll("dt"):
print dt.contents
</code></pre>