您还必须在使用
xlink
解析的字符串中声明
fromstring
link = ET.fromstring('<a xmlns:xlink="http://www.w3.org/1999/xlink" ' 'xlink:href="http://www.mysite.com/"></a>')