XPath and special characters
Posted
by Bryan
on Stack Overflow
See other posts from Stack Overflow
or by Bryan
Published on 2010-04-23T20:56:09Z
Indexed on
2010/04/23
21:23 UTC
Read the original article
Hit count: 386
I am having an issue with an XPath query I'm performing for a Sitecore CMS system.
This query works fine:
/root/content/Meta-Data/Tips/*
But when I try this:
/root/content/Meta-Data/Tips/*[@SomeAttribute='somekey']
I get an error which says "End of string expected at position 22" which is where the dash character is found. I was under the impression that the dash was not a special character in XML... am I doing something wrong here? Do I need to encode this in some way? Or is this a bug in the XPath parser? Any suggested workarounds?
© Stack Overflow or respective owner