Re: [xml] Default namespaces with XPath

Can't you go:


or even:




Daniel Veillard wrote:
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 
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


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