title: Parse html page from url link with xPath(javascript, jquery)
body: <p>I'm really new to Javascript/jQuery. I've coded in Objective-C and Swift before and there it was possible to parse a (x)html-website with XPath and a framework like Hpple.</p>
  
  <p>Now I have to do something like that in JavaScript(Cloud Code from parse.com).</p>
  
  <p>My problem is now, that I'd like to parse like that:</p>
  
  <pre><code>var url = "http://www.google.com";
  var xpath = "//body";
  someJavaScriptMagic.parse(url, xpath);
  </code></pre>
  
  <p>I've often seen people using the <code>document.evaluate</code>method, but there they parsed the website on which they were at the moment and not another website.</p>
  
  <p>Is there a way to do that?</p>
  
  <p>I dont know if it's important, but I'm using CloudCode from parse.com</p>
  
  <p>EDIT:</p>
  
  <p>I've already tried using the ajax-query:</p>
  
  <pre><code>$.ajax({ url: 'http://www.digitec.ch', success: function(data) { alert(data); } });
  </code></pre>
  
  <p>But I get the following error each time:</p>
  
  <pre><code>XMLHttpRequest cannot load http://www.digitec.ch/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://fiddle.jshell.net' is therefore not allowed access.
  </code></pre>