<html>
<head>
<script src="/demo/loadxmldoc.js"></script>
</head>
<body>
<script>
xmlDoc=loadXMLDoc("books.xml");
newComment=xmlDoc.createComment("Revised April 2008");
x=xmlDoc.getElementsByTagName("book")[0];
x.appendChild(newComment);
document.write(x.lastChild.nodeValue);
</script>
</body>
</html>