在上述XML 文档中,根元素是bookstore,它没有属性,也可以说是属性为空。 >>> root = tree.getroot() >>> root.tag 'bookstore' >>> root.attrib {}.
確定! 回上一頁