lxml 可以解析xml的字符串,使用etree.fromstring方法,如下所示: ... texts = []; #获取第1段文本; if target.text: texts.append(target.text) ...
確定! 回上一頁