Hi Mike,
you can use the Xpath function normalize-space(string) to remove the leading or trailing spaces. refer the below link
XPath, XQuery, and XSLT Function Reference
the other option is to use hexadecimal value for space. refer the expression in below conversation
Locating the node by value containing whitespaces using XPath - Stack Overflow
regards,
Harish