Re: [xml] Default namespaces with XPath

On Wed, Dec 25, 2002 at 01:42:40PM +0530, Ganesh Sivaraman wrote:
   I'm still learning the ropes with XML. I understand I can use XPath to access particular nodes in the 
DOM tree.
I have a xml doc. with default namespaces as below:
What am I doing wrong and how do I use XPath with default namespaces?

  You cannot, it's a restriction of the XPath specification !
You have to define a prefix for the namespace, register it with
xmlXPathRegisterNs() and use that prefix in the XPath expression.
There is no way around this, this is defined in the XPath spec


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]