Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@michiel
Last active December 15, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michiel/5240287 to your computer and use it in GitHub Desktop.
Save michiel/5240287 to your computer and use it in GitHub Desktop.
Fetch an XML file and parse it with jQuery
$ ->
$.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