Hi guys,
I'm trying to get an XML through the Ajax function of Jquery, the code is something like this :
- function getXML() {
-
- var XMLResponse = $.ajax({
- type: "GET",
- url: "teste.xml",
- dataType: "xml"
- });
- var Xml;
- XMLResponse.success(function(data){Xml = data;});
- console.log(Xml);
- // I would like to put here a return(Xml); but it goes as undef to the console.
- }
I'm sure I have an scope problem over there, just don't know how to go around.
I just would like to spit the xml Jquery object. That would be nice. There is a quicker/nicer way to do it? or at least one that works?
Thanks,
Samir