Re: [xml] Namespace in XPath

On Tue, May 15, 2001 at 02:42:32PM -0700, Sze, Tak F wrote:
I tried using namespace in XPath, and it does not seem to work:

   <doc xmlns:test="";>

XPath used is "/doc/test:element"

Is there another interface to pass the namespace URI mapping
for the prefix used in the XPath expression?

  Use xmlXPathRegisterNs () to register the namespace within
the evaluation context.

Or use the local-name() and namespace-uri() functions of XPath
  /*[local-name()='element' and namespace-uri()='']


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

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