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

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -