Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Test Page</title>
<style>
  body {
    font-family: sans-serif;
  }
</style>
</head>
<body>
</body>
</html>
 
jQuery(function($) {
  
  var xml = '<books><book><id>1</id></book></books>';
  var xmlDoc = $.parseXML(xml);
  $(xmlDoc).find("book").each(function(){
    display($("<x>").append(this.cloneNode(true)).html());
  });
  
  function display(msg) {
    $("<p>").html(String(msg).replace(/\&/g, "&amp;").replace(/</g, "&lt;")).appendTo(document.body);
  }
  
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers