title: get xml data from url using js code
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3595515/xmlhttprequest-error-origin-null-is-not-allowed-by-access-control-allow-origin">XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-Origin</a>  </p>
  </blockquote>
  
  
  
  <p>I have tried different ways to read xml data from url using js,ajax,jquery but there is no use.</p>
  
  <p>The xml url is : <a href="http://api.simplyhired.com/a/jobs-api/xml-v2/q-java?pshid=46484&amp;ssty=2&amp;cflg=r&amp;jbd=nichehire.jobamatic.com&amp;clip=183.82.97.123" rel="nofollow noreferrer">http://api.simplyhired.com/a/jobs-api/xml-v2/q-java?pshid=46484&amp;ssty=2&amp;cflg=r&amp;jbd=nichehire.jobamatic.com&amp;clip=183.82.97.123</a></p>
  
  <p>I got error which looks like this:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load "<a href="http://api.simplyhired.com/a/jobs-api/xml-v2/q-java?pshid=46484&amp;ssty=2&amp;cflg=r&amp;jbd=nichehire.jobamatic.com&amp;clip=183.82.97.123" rel="nofollow noreferrer">http://api.simplyhired.com/a/jobs-api/xml-v2/q-java?pshid=46484&amp;ssty=2&amp;cflg=r&amp;jbd=nichehire.jobamatic.com&amp;clip=183.82.97.123</a>." Origin <a href="http://www.nichehire.com" rel="nofollow noreferrer">http://www.nichehire.com</a> is not allowed by Access-Control-Allow-Origin.  </p>
  </blockquote>
  
  <p>Do I need to add request headers while requesting the url.</p>
  
  <p>if so how can I add request header while requesting,</p>
  
  <p>Is there any procedure to follow for getting XML data from URL.</p>
  
  <p>can some one Please try this URL with your code to read XML data and let me know if possible</p>
  
  <p>i have tried below code</p>
  
  <pre><code>$.ajax({
      type: "GET",
  url: "http://api.simplyhired.com/a/jobs-api/xml-v2/q-java?pshid=46484&amp;ssty=2&amp;cflg=r&amp;jbd=nichehire.jobamatic.com&amp;clip=183.82.97.123",
  dataType: "xml",
  success: function(xml) {
  alert(xml);
  }}); 
  </code></pre>