Javascript - use to load xml data from URL
- by spenf
I have this url with some xml data in it:
http://64.182.231.116/~spencerf/union_college/Upperclass_Sample_Menu.xml
And I would like to load this xml data into my javascript script so I can parse it. I am using parse.com Javascript SDK, in there cloud code.
Here is the code I have tried:
Parse.Cloud.define("next", function(request, response) {
response.success("Hello world!");
$.ajax({
url: 'http://64.182.231.116/~spencerf/union_college/Upperclass_Sample_Menu.xml', // name of file you want to parse
dataType: "xml", // type of file you are trying to read
success: parse, // name of the function to call upon success
error: function(){alert("Error: Something went wrong");}
});
});
But when I run this I get an error:
$ is not defined
at main.js: