Grauw’s blog

XML DOM browser tests

July 29th, 2006

I don’t think I ever posted about this, but a couple of months ago I created a test suite to be able to test how well browsers actually support the XML DOM. It contains various tests of DOM 1, 2 and 3 functionality, although it is by no means complete. The expected result is included as well, and the cells are highlighted to reflect the correctness of the result.

This basically sums up the results of the tests:

  • Mozilla Firefox (Gecko 1.8) is the browser with the best XML DOM support, it fails in 9 tests of which 6 are caused by confusing null, the empty string '' and the value 0 (which it gets away with due to Javascript’s automatic value conversion). The remaining three are due to it not properly matching prefixed tag names in certain DOM 1 methods.

  • Safari (Webkit/420+) comes in as a close second. Safari (WebKit/417.9) totally messed up in the attributes department by putting attributes in the default namespace (should be null for attributes without prefix) and ignoring prefixes altogether. Safari (Webkit/420+) however makes up by fixing all that, the red it shows is only because it rearranges the order of the attributes which is not really a problem. However, it still has the wrong namespace URI on xmlns attributes. Further problems are similar to those of Firefox.

  • Opera 9 is quite good as well, ranking third in these tests. Opera 9 has seen an enourmous improvement compared to Opera 8.5 which was basically just, well, crap. In particular Opera 8 suffered from various namespace-related bugs (some very strange), and of some of those you still see traces in Opera 9. Aside from it inserting processing instruction content in the textContent and some other bugs similar to Firefox and Safari’s, everything seems pretty ok.

  • Not surprisingly, Internet Explorer (based on MSXML) doesn’t do well at all. It has extremely minimal support for namespaces, it ignores whitespace-only text nodes, and many things are not implemented, even pretty essential methods such as hasAttribute. What is very strange though is that MSXML 3.0 is actually doing much better than the later versions MSXML 4.0 and 6.0! So be sure to always get the MSXML 3.0 ActiveX component; in IE6 use 'MSXML2.XMLHTTP', and in IE7 use the XMLHttpRequest object, it will get you MSXML 3.0 too.

  • Finally, Konqueror 3.5. These test results are so bad, I wonder whether the test ran at all -_-;;. As I didn’t run the test on this browser myself I haven’t been able to look into the specific cause. Let’s hope that newer versions will do better.

This reflects the current state of the test results. I’ll be adding tests when I need them, and if I get submissions for browsers not in the list I will also add them.

To see the browser test results for your browser and the previous test results for several browsers, click the link below. Please note that the tests use JavaScript extensively, so obviously it has to be enabled :).

» Go to the XML DOM browser tests


1 comment [reply]


Thank you by Laura at 2016-01-04 18:59

Thank you very much for the information. Useful!

» Add a comment…