title: How to solve error java.lang.RuntimeException for XPATH ? MAVEN dependencies added
body: <p>I am getting following error</p>
  <pre><code> java.lang.RuntimeException:  Trying XBeans path engine... Trying XQRL... Trying XDK... Trying delegated path engine... FAILED on data(//v:shape[contains(@id,'PowerPlusWaterMarkObject')]/v:textpath/@string)
  </code></pre>
  <p>while executing following code</p>
  <pre><code>private String getWaterMark(XWPFDocument document) {
     try {
          XWPFHeader defaultHeader = document.getHeaderFooterPolicy().getDefaultHeader();
          final String xpathFilter = &quot;data(//v:shape[contains(@id,'PowerPlusWaterMarkObject')]/v:textpath/@string)&quot;;
          XmlObject[] xmlobjects = defaultHeader._getHdrFtr().selectPath(xpathFilter);
          return xmlobjects[0].toString();
     } catch (Exception ex) {
         logger.error(&quot;Error while getting Watermark content from document: &quot;, ex);
     }
  }
  
  </code></pre>
  <p>I have added following dependencies in <code>pom.xml</code> file.</p>
  <pre><code>        &lt;!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans-xpath --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.xmlbeans&lt;/groupId&gt;
              &lt;artifactId&gt;xmlbeans-xpath&lt;/artifactId&gt;
              &lt;version&gt;2.6.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.sf.saxon&lt;/groupId&gt;
              &lt;artifactId&gt;Saxon-HE&lt;/artifactId&gt;
              &lt;version&gt;10.6&lt;/version&gt;
          &lt;/dependency&gt;
  
  </code></pre>