title: Parse html using xpath
body: <p>Need get html from server and parse it using xpath (xpath is necessarily i can't using something else). My code :</p>
  
  <pre><code>TagNode tagNode = new HtmlCleaner().clean(html);
  Document doc = new DomSerializer(new CleanerProperties()).createDOM(tagNode);
  XPath xpathObject = XPathFactory.newInstance().newXPath();
  NodeList nodes = (NodeList)xpathObject.evaluate(xpathString, html, XPathConstants.NODESET);
  </code></pre>
  
  <p>It works good but function clean() take a lot of time (for a page can take > 30 s).</p>
  
  <p>I found other solution - using Jsoup, so my new code is - </p>
  
  <pre><code>Document doc = Jsoup.parse(html);
  W3CDom w3cDom = new W3CDom();
  org.w3c.dom.Document w3cDoc = w3cDom.fromJsoup(doc);
  
  XPath xpathObject = XPathFactory.newInstance().newXPath();
  str = (String) xpathObject.evaluate(xpathString, w3cDoc, XPathConstants.STRING);
  </code></pre>
  
  <p>Now parse and convert to org.w3c.dom.Document take about 1s + evaluate 0.4s ~ 1.5 second. But this is very slow too. </p>
  
  <p>How can I increase speed of processing more?</p>