import xml.etree.cElementTree as ET
def get_attr_number(node):
root=ET.fromstring(node)
length=0
for i in root:
l=len(i.attrib)
length+=l
print (length)
if __name__=="__main__":
n=int(input())
for i in range(n):
node=input()
print (node)
get_attr_number(node)
我无法将xml字符串传递给函数here.Kindly帮助我。 提前谢谢!