jquery - How to serialize entire XML document into JavaScript array? -
I have an HTML document that loads an XML document using jQuery
< Code> jquery.ajax {type: "gET", url: example.xml, etc ...
When that XML loads, I will copy the entire XML document to a JavaScript array I want to sort in
How do I do this?
something like that?
jQuery.ajax ({type: "GET", url: "example.xml", success: function (data) {var results = []; // this bit on your XML structure Depending on it, you get the idea $ (data) .find ('your_element'). Each (function () {results.push ($ (this)}}}}}}}})
< / Pre>
Comments
Post a Comment