I don't really have the time to work on this, but the differences between HTML and XML mode are: 1. no document.write 2. no innerHTML 3. when you create new elemens, they need the XHTML namespace: `document.createElementNS(sNamespaceUri, sTagName)`