Last active
December 15, 2015 09:39
-
-
Save michiel/5240287 to your computer and use it in GitHub Desktop.
Fetch an XML file and parse it with jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
$.ajax | |
url : 'path/file.xml' | |
dataType : 'xml' | |
success : (doc)-> | |
$(doc).find('element').each -> | |
element = $ this | |
id = element.attr 'id' | |
console.log id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment