在我的代码中。文本在第三行运行良好,但是
AttributeError: 'list' object has no attribute 'text'`
最后一行出错。两者都一样,但问题是什么?在
for elem6 in doc.findall('.//medicationsInfo/entryInfo'):
drugcodeSystem.append(elem6.find('productCode/codeSystem'))
drugname.append(elem6.find('productCode/displayName').text)
routecode.append(elem6.find('routeCode/code'))
routecodeSystem.append(elem6.find('routeCode/codeSystem'))
drugname1.append(elem6.find('productCode/codeSystemName').text)
目前没有回答
相关问题 更多 >
编程相关推荐