摘要: import lxml.etree as et xml=""" apple pear strawberry blueberry starfruit mango peach """ tree=et.fromstring(xml) for bad in tree.xpath("//fruit[@state='rotten']"): ... 阅读全文
posted @ 2015-07-29 13:32 aprial 阅读(176) 评论(0) 推荐(0)