<!-- must be sent as application/xml -->
<root>
 <head xmlns="http://www.w3.org/1999/xhtml">
  <title>DOM Core: createElement()</title>
  <script type="text/javascript">
    function doTest() {
      var result = document.getElementById('result');
      var test = document.getElementsByTagName('test');
      if (test &amp;&amp; test.length)
         test = test[0];
      else {
         result.firstChild.data = 'FAIL: could not find test element.';
         return;
      }
      test.appendChild(document.createElement('textarea'));
      if (test.childNodes[0].namespaceURI != null) {
         result.firstChild.data = 'FAIL: createElement() used wrong namespace: ' + test.childNodes[0].namespaceURI
         return;
      }
      result.firstChild.data = 'PASS';
    }
  </script>
 </head>
 <body xmlns="http://www.w3.org/1999/xhtml" onload="doTest()">
  <p id="result">FAIL: script did not execute.</p>
  <test xmlns="http://www.example.org/test"/>
 </body>
</root>
