Code (JavaScript): xml_doc = new ActiveXObject("Microsoft.XMLDOM"); xml_doc.async = false; xml_doc.load("states.xml"); implementation = xml_doc.implementation has_feature = implementation.hasFeature("html", "1.0"); document.write("HTML: " + has_feature); has_feature = implementation.hasFeature("xml", "1.0"); document.write("<br>XML: " + has_feature);
Output: HTML: false XML: true