With so much new emerging technology over the last few months I thought I would invest in some new reading material to try and get to grips with some of this new technology. I have to confess I'm not a great reader, I tend to dip in and out of books to get the information I need and then put it down - I find that's the way I learn best. However, I have purchased one book that I am absolutely fascinated by and comparitively speaking.............. I can't put it down! So, what is this read that has me so gripped? It's a book by Bob Walsh called "The Web Startup Success Guide" (ISBN 978-1-4302-1985-9).
I would recommend this book to anyone starting, about to start or even running in its infancy a web or software company. It's not that it has any definitive answers but it has certainly made me think, look at and re-assess some aspects of the direction I am trying to take my company Maiden Software.
Thursday, 4 February 2010
Tuesday, 2 February 2010
XPath 1.0 Query and ends-with
I was trying to find a set of nodes in an xml document that ended in "id" (personid, addressid etc). Upon discovering that version 1.0 of XPath does not support the ends-with expression that is supported in version 2.0 it was time for a work around!
After much research on the web I found that the only real way to do this was to use the substring function thus:
xmldoc.SelectNodes("//*[substring(name(), string-length(name()) - 1) = 'id']");
This delivers back a node set that was exactly what I wanted!
After much research on the web I found that the only real way to do this was to use the substring function thus:
xmldoc.SelectNodes("//*[substring(name(), string-length(name()) - 1) = 'id']");
This delivers back a node set that was exactly what I wanted!
Subscribe to:
Posts (Atom)