ElementTree and XPATH

Fredrik Lundh fredrik at pythonware.com
Thu Dec 9 09:36:14 CET 2004


<dayzman at hotmail.com> wrote:

> I'm using ElementTree from effbot (http://effbot.org/zone/element.htm)
> and I'm having some problems finding nodes that have the same name. I
> know in XPATH, we can use an index to identify which node we need, but
> it seems to be invalid syntax if I give "/a/b[0]" to the findall()
> method. Does anyone know the correct syntax?

the XPath subset supported by ElementTree is documented here:

    http://effbot.org/zone/element-xpath.htm

for more extensive support, see Ken Rimey's PDIS toolkit:

    http://pdis.hiit.fi/pdis/download/

</F> 






More information about the Python-list mailing list