Read XML file using jQuery
<p>I have to read <strong>an XML file using jQuery</strong>, but I don't know <strong>how to start it</strong>.</p>

<p>The HTML file is located on my localhost.</p>

<p>This is what I have tried.
I have two problems.</p>

<ol>
<li>I searched and tried to apply what I have read on how to read an XML file using jQuery</li>
<li><p>I don't know the problem, because the try and catch which is supposed to give me a hint of something what I have done wrong doesn't give me a error message or a hint.</p>

<pre><code>$(document).ready(function(){
try {
    $("button").click(function(){
        var xml = $.parseXML("C:\Users\askquestion\Desktop\1.xml"),
        alert($xml);
    });
}
catch(err) {
    alert(err.message);
} });
</code></pre></li>
</ol>

<p>I'm trying to figure out how to make this code works, but why does it give me the output of "null"?</p>

<p>But the 1.xml is properly located</p>

<pre><code>$.ajax({
    type: "GET",
    url: "1.xml",
    dataType: "xml",
    success: function(xml){
        var xmlDoc = $.parseXML(xml);
        //var root = $(xmlDoc).find("root");
        alert(xmlDoc);
    }
});
</code></pre>