You say you want the contents of the <c> node, but your code is asking for nodes containing a space. When writing code for Xpath, perl or any other language, you need to write code that asks for exactly what you want, rather than rather than trying to hack together an unrelated request that may--by chance--give you the result you wanted.
I haven't done Xpath in quite a while, so I don't recall the syntax, but google led me to a couple sites with Xpath examples. It appears that asking for a specific node type is more like: //nodetype, so in your case you'd use //c. If you want X but ask for Y, don't be surprised when you get useless results. If you don't know how to ask Xpath (or any other language) the right question, google is but a few keystrokes away.
Update: After seeing AM's response, I realize your search criterion may be to find nodes containing multiple contiguous blanks. In that case, you could use //*[*contains(.," ")] (Note: two blanks), and if you're using XPath 2.0, you could use a regex: //*[*matches(.,'\s\s')]. (Note: I've not tested these, so they may need tweaking.
Update 2: choroba has an even better answer--I didn't even consider the "between words" clause.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: Need help for Xpath patterns
by roboticus
in thread Need help for Xpath patterns
by Anusha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |