Re: Svar: Re: [xml] XPath problem with namespaces



Thanks,
 
that was it. I knew I knew it, there was just too much info at once ;-) But why can't it simply register all the namespaces from the document itself in xmlXPathNewContext?
 
- Erik

>>> Daniel Veillard<veillard redhat com> 07-06-2004 23:55:18 >>>
On Mon, Jun 07, 2004 at 09:40:00PM +0200, Erik F. Andersen wrote:
> No, it doesn't work. About the only _expression_ I can get to work is something like //*. This will return the Envelope (as expected) node as the first node in the result. The namespace for this node is SOAP-ENV (also as expected).

  You *must* provide the namespace declaration to the prefix used.
Read the example it shows how to bind namespaces to XPath evaluation context !
   http://xmlsoft.org/examples/index.html#xpath1.c

Daniel

--
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]