Checks if a string contains an XPath expression.
True, if the string contains an XPath expression, otherwise false.
This function can be used to differentiate between Sitecore paths and XPath expressions. A path is considered an XPaath expression if it contains "item[" or "::item".
bool b0 = MainUtil.IsXPath("/item[@key='sitecore']/item[@key='content']"); // true
bool b1 = MainUtil.IsXPath("/sitecore/content"); // false
MainUtil Class | Sitecore Namespace