Re: Svar: Re: [xml] XPath problem with namespaces
- From: Fabrice Desré - France Telecom R&D/DTL/TAL <fabrice desre francetelecom com>
- To: ea ascott dk
- Cc: xml gnome org, veillard redhat com
- Subject: Re: Svar: Re: [xml] XPath problem with namespaces
- Date: Tue, 08 Jun 2004 09:36:14 +0200
Erik F. Andersen wrote:
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?
Because there's no way to predict which prefix will be used in the
instance (you can even use a default namespace). So you have to bind the
prefix that you will use in the xpath expression, and it can be
different from the prefix in the document.
HTH
Fabrice
--
Fabrice Desré
France Télécom R&D/DTL/TAL
Tél: +(33) (0)2 96 05 31 43
Fax: +(33) (0)2 96 05 39 45
http://www.francetelecom.com/rd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]