How to load and use XML in jsfiddle

I am using the code below to use xml loading in jsfiddle.net

  $.ajax({
   type: "GET",
   url: "/echo/note.xml",
   dataType: "xml",
   success: function(xml) {
        alert('Hi');       
   }
  });

But that does not work. Please take a look at this and correct my mistakes.
here is a violin

+5
source share
2 answers

See fiddle and docs section .

$(function() {
    $.ajax({
        type: "POST",
        url: "/echo/xml/",
        dataType: "xml",
        data: {
            xml: "<the>xml</the>"
        },
        success: function(xml) {
            console.log(xml);
        }
    });
});
+3
source

You must specify the contents of the ping. See Documents:

http://doc.jsfiddle.net/use/echo.html

Here is sample code thanks to @Rocket.

$.ajax({
    type: "POST",
    url: "/echo/xml/",
    data: {
        xml: '<true/>'
    },
    dataType: "xml",
    success: function(xml) {
        alert('Hi');
    }
});
+2
source

All Articles