16 Aug 2012 03:24
Fwd: XPath and prefix bindings
Dimitre Novatchev <dnovatchev <at> gmail.com>
2012-08-16 01:24:57 GMT
2012-08-16 01:24:57 GMT
---------- Forwarded message ---------- From: Dimitre Novatchev <dnovatchev <at> gmail.com> Date: Wed, Aug 15, 2012 at 4:27 PM Subject: Re: [xml-dev] XPath and prefix bindings To: Fraser Goffin <goffinf <at> gmail.com> What is the hosting language (such as C#, Java, PHP, ..., etc) in which you are evaluating the XPath expressions? You need to "register" the namespaces (the bindings (prefix, namespace-uri)+) and then you can use any of the registered prefixes in an XPath expression and its evaluation. The rules for registering namespaces are different for different hosting languages/environments. Cheers, Dimitre. On Wed, Aug 15, 2012 at 10:53 AM, Fraser Goffin <goffinf <at> gmail.com> wrote: > Here's something I *thought* I understood, but now I'm not so sure ? > > Below is an XML instance that includes two namespace prefixes bound to > the same namespace (dis and NS1) :- > > <dis:Numbers xmlns:dis="urn:numbers"> > <NS1:Odds xmlns:NS1="urn:numbers"> > <NS1:One>1</NS1:One> > <NS1:Three>3</NS1:Three> > <NS1:Five>5</NS1:Five>(Continue reading)
RSS Feed