![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - more XPath struggles (tDOM) >Thread Next - Re: more XPath struggles (tDOM) Re: more XPath struggles (tDOM)To: NULL Date: 5/2/2008 5:02:00 PM
Mikhail Teterin wrote:
> $xml selectNodes {//mp:date}
>
> does not find any, but
>
> $xml selectNodes {//*[name()="mp:date"]}
>
> works. What's the reason for the difference?
XPath is namespace-aware. To select a namespaced node, you must use a
prefix in your path (which you did) and tell your XPath evaluator what
the prefix bound to (which you didn't). Look at the user's manual for
your tool.
(comp.lang.xml doesn't exist on my server, so I can't crosspost there.)
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
