You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							25 lines
						
					
					
						
							848 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							25 lines
						
					
					
						
							848 B
						
					
					
				
								<!doctype html>
							 | 
						|
								
							 | 
						|
								<html lang="en">
							 | 
						|
								<head>
							 | 
						|
								  <title>xmldoc browser test</title>
							 | 
						|
								  <script type="text/javascript" src="../node_modules/sax/lib/sax.js"></script>
							 | 
						|
								  <script type="text/javascript" src="../lib/xmldoc.js"></script>
							 | 
						|
								  <script type="text/javascript">
							 | 
						|
								    // Demonstrate parsing an in-memory XML string
							 | 
						|
								    var xmlString = '<suggestions><book title="Twilight"/><book title="Twister"/></suggestions>'
							 | 
						|
								
							 | 
						|
								    var suggestions = new XmlDocument(xmlString);
							 | 
						|
								
							 | 
						|
								    // Demonstrate how toString() will pretty-print an abbreviated version of the XML for debugging
							 | 
						|
								    console.log("Parsed: \n" + suggestions);
							 | 
						|
								
							 | 
						|
								    // Demonstrate a simple eachChild() loop, printing our book titles
							 | 
						|
								    suggestions.eachChild(function(book) {
							 | 
						|
								      document.write("<p>Found book with title: '" + book.attr.title + "'</p>");
							 | 
						|
								    });
							 | 
						|
								</script>
							 | 
						|
								</head>
							 | 
						|
								<body>
							 | 
						|
								</body>
							 | 
						|
								</html>
							 |