You are here

isValidXpathQuery

isValidXpathQuery(query) checks the validity of an XPath query string.

Parameters

query

The XPath query string to check.

Returns

Returns true is the query is a valid XPath query string, false otherwise.

Example

The method can be used to check the validity of a XPath query prior to use:

if (search.isValidXpathQuery(query)){
    nodes = search.xpathSearch(query);
}
else {
  // ...
}
      

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.