Skip to main content

Bug Tracker

Side navigation

Ticket #4748: test.html
File test.html, 1.0 KB (added by morgancodes, June 11, 2009 07:50PM UTC)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>untitled</title>
	<meta name="generator" content="TextMate http://macromates.com/">
	<meta name="author" content="Morgan Packard">
	<!-- Date: 2009-06-10 -->
    	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
</head>
<body>
<script>

var xml;



$.ajax({
  type: "GET",
  url: "data.xml",
  success: function(data){
      var node = $("CI:first", data);
      var query1 = $("T TX", node).length;
      var query2 = $("T", node).find("TX").length;
      
      var msg = "";
      msg += "parent node length: " + node.length;
      msg += "\n";
      msg += '$("T TX", node).length: ' + query1;
      msg += "\n";
      msg += '$("T", node).find("TX").length: ' + query2;
      alert(msg);
  }
});


</script>
</body>
</html>

Download in other formats:

Original Format