Good question. Theoretically yes - in practice no.

As I understand it the only characters that need escaping are ' and ". I do not think it likely that such characters appear in XML attributes that we search for. Type names etc. are likely to map to programmatic names on the server side and it seems reasonable to assume that they do not contain these characters.

In general [the userland XPath escape functions](https://gist.github.com/jaywilliams/2883026) I have seen are not particularly elegant and I like to avoid adding complexity if possible.