我只是想得到一个XML文件的一些值,但什么也得不到。你知道吗
<?xml version="1.0" ?>
<clasif>
<estacion>Estacion</estacion>
<ncamaras>1</ncamaras>
<fph>1</fph>
<tratamiento>3</tratamiento>
<finicio>17/07/2011</finicio>
<ffin>17/07/2011</ffin>
<hinicio>04</hinicio>
<hfin>06</hfin>
</clasif>
这是访问值的代码:
from lxml import etree
doc = etree.parse ( 'clasif.xml' )
root = doc.getroot()
elem= doc.xpath ('//estacion')
我做错什么了?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐