13 Mar
2006
13 Mar
'06
11:18 a.m.
Fabien SCHWOB wrote:
I've successfully compiled and installed lxml, but now I have XPath errors. To be precise, the error is that no nodes are returned. I'm using "//a" on "http://www.w3.org/". It's seems to be an namespace error but I haven't found how to give to the .xpath() function the default namespace.
You mean like described in doc/xpath.txt or doc/api.txt? http://codespeak.net/lxml/xpath.html http://codespeak.net/lxml/api.html The default namespace is None, but you can also use an XPath expression like "//xhtml:a" is you prefer. Stefan