Standing on the shoulders of giants. RSS 2.0
# Monday, October 06, 2003

I had a lot of trouble with a XPath query yesterday and didn't find a lot on google, so I'll post the solution I found here.

<foo>

<bar xmlns="http://www.w3.org/1999/xhtml">content goes here</bar>

</foo>

The problem I had was creating a query to get the content of the bar element, since it's not in the default namespace. The solution I found appears to me as a nasty hack, so any comments pointing to a better solution are welcome:

/foo/*[local-name() = 'bar' and namespace-uri() = 'http://www.w3.org/1999/xhtml']

Monday, October 06, 2003 12:05:27 AM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
Development
Comments are closed.
About
© Copyright 2009
Paul van Brenk
Sign In
newtelligence dasBlog 2.3.8275.16006
All Content © 2009, Paul van Brenk
DasBlog theme 'Business' created by Christoph De Baene (delarou)