xml.etree Syntax of path?
Stefan Behnel
stefan_ml at behnel.de
Fri May 9 06:02:04 EDT 2008
Thomas Guettler wrote:
> I think the documentation of xml.etree is missing something[1].
>
> {{{
> find(path)
> Finds the first toplevel element with given tag. Same as
> getroot().find(path). path is the element to look for.
> }}}
>
> According to the source etree has limited support for xpath. I think it
> should be documented what 'path' should look like to.
You mean like this?
http://effbot.org/zone/element-xpath.htm
Note that the method is called "find()", not "execute_xpath()" or something.
If you want full XPath support, lxml is your friend.
Stefan
More information about the Python-list
mailing list