Skip to content

Instantly share code, notes, and snippets.

@olvap
Created November 29, 2010 21:46
Show Gist options
  • Save olvap/720690 to your computer and use it in GitHub Desktop.
Save olvap/720690 to your computer and use it in GitHub Desktop.
#xml
<?xml version="1.0" encoding="UTF-8"?>
<localidad>
<created-at type="datetime">2010-11-28T01:12:59Z</created-at>
<departamento-id type="integer">1</departamento-id>
<id type="integer">1</id>
<name>16 DE JULIO</name>
<updated-at type="datetime">2010-11-28T01:12:59Z</updated-at>
</localidad>
# js
$.ajax({
url: "/localidads/1.xml",
success: function(data) {
$("#result").replaceWith( $(data).find("created-at"));
}
});
#html
<div id="result"></div>
#result
2010-11-28T01:12:59Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment