Re: libxml2/xpath

2004-12-16 Thread Frans Englich
On Thursday 16 December 2004 14:46, [EMAIL PROTECTED] wrote: > > # confDocument is a libxml2 document, from parseFile() etc > > xp = confDocument.xpathNewContext() > > xp.xpathRegisterNs("xhtml", "http://www.w3.org/1999/xhtml";) > > dirElement = xp.xpathEval( "/xhtml:html" ) > > Stu

Re: libxml2/xpath

2004-12-16 Thread maxk
> # confDocument is a libxml2 document, from parseFile() etc > xp = confDocument.xpathNewContext() > xp.xpathRegisterNs("xhtml", "http://www.w3.org/1999/xhtml";) > dirElement = xp.xpathEval( "/xhtml:html" ) > Stupid question, but can the namespace somehow be changed to null to mak

Re: libxml2/xpath

2004-12-16 Thread Frans Englich
On Thursday 16 December 2004 12:29, Maxim Khesin wrote: > I do not believe it is... You can see the doc by clicking on the link. > Does it have to be? No, but your XPath statements must match the namespace, no matter what it is. The document do have a namespace -- as XHTML should: http://www.w3

Re: libxml2/xpath

2004-12-16 Thread Maxim Khesin
I do not believe it is... You can see the doc by clicking on the link. Does it have to be? thanks, m Martijn Faassen wrote: Maxim Khesin wrote: I am trying to do some xpath on http://fluidobjects.com/doc.xhtml but cannot get past 'point A' (that is, I am totally stuck): import libxml2 mydoc = li

Re: libxml2/xpath

2004-12-16 Thread Martijn Faassen
Maxim Khesin wrote: I am trying to do some xpath on http://fluidobjects.com/doc.xhtml but cannot get past 'point A' (that is, I am totally stuck): import libxml2 mydoc = libxml2.parseDoc(text) mydoc.xpathEval('/html') [] this returns an empty resultlist, which just seems plain wrong. Can anyone t

libxml2/xpath

2004-12-15 Thread Maxim Khesin
I am trying to do some xpath on http://fluidobjects.com/doc.xhtml but cannot get past 'point A' (that is, I am totally stuck): >> import libxml2 >> mydoc = libxml2.parseDoc(text) >> mydoc.xpathEval('/html') >> [] this returns an empty resultlist, which just seems plain wrong. Can anyone throw a s