Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this FAQ
Current state of existing browser support for XML (1 January 2021):
Current versions of Microsoft Edge and Internet Explorer, Firefox, Safari, Chrome, Mozilla, Vivaldi, Brave, and Opera all appear to offer at least partial support for XML with CSS2 and/or XSLT 1.0 stylesheets. Mobile versions of Safari and Chrome also appear to offer the same kind of support, but their CSS is sometimes broken. The editor would welcome additional information and corrections.
The Editor maintains a personal Recipes site with pages in HTML generated from XML using XSLT3; but the printable versions are actually the raw XML styled with CSS3 (comments and suggestions welcomed).
Don’t use Netscape (any version), Internet Explorer 6 or earlier, or any early versions of Mozilla if you want XML support: they either don't have it or were hopelessly broken. Upgrade to a modern browser as soon as possible.
The remainder of this list is of historical interest only.
Microsoft Internet Explorer 5.0 and 5.5 handled XML, processing it by default using a built-in stylesheet written in a Microsoft-specific, obsolete predecessor of XSLT called XSL (not to be confused with the real XSLT). The output of the stylesheet is DHTML, which, when rendered in the browser, shows a coloured, syntax-highlighted version of the XML document, with collapsible views. If the XML document references a stylesheet, that stylesheet will be used instead, within the limitations of MSIE's incomplete implementation of CSS. MSIE 5.0 and 5.5 can also use stylesheets in another obsolete syntax called WD-xsl, which should be avoided. These versions can be upgraded to support real XSLT: see the MSXML FAQ.
MSIE 6.0 and later use real XSLT 1.0, but can use both the obsolete syntaxes as well.
Mozilla Firefox 0.9 up, Netscape 6 and 7 (there is no Netscape 5), and Galeon all have full XML support with XSLT and CSS. In general, Firefox is more robust than MSIE, and provides better standards adherence.
I have a user report that Netscape 4.6 and 4.8 supports XML, but no independent verification.
The authors of the former MultiDoc Pro SGML browser, CITEC (whose engine was also used in Panorama and other browsers), joined forces with Mozilla to produce a multi-everything browser called DocZilla, which read HTML, XML, and SGML, with XSLT and CSS stylesheets. This ran under Windows and Linux and was at release 1.0 at the time it became unavailable. This was by far the most ambitious browser project, and was backed by very solid markup-handling expertise.
I have less information on the XML capabilities of the Mac OS X browser Safari, which is based on the KHTML engine used in Konqueror. Konqueror itself does not appear to support XML or XSLT (at least in KDE under Fedora Core, for example), but Safari 1.3.2 (v312.6) under OS 10.3 did provide partial support for XML, but does not honour an external DTD modified by an internal subset (thanks to John Haynie for testing this).
Mike Brown writes:
The concept of ‘browsing’ is primarily the result of HTML having the semantics that it does. In an HTML document there are sections of text called anchors that are ‘hyperlinked’ to other documents that might be at remote locations on a network or filesystem. HTML documents provide cues to a web browser regarding how the document should be displayed and what kind of behaviours are expected of the browser when the user interacts with it. The HTML specification provides many suggestions and requirements for the browser, and provides specific meanings for many different examples of markup, such as the fact that an <img> element refers to an image that should be retrieved by the browser and rendered inline with the adjacent text.
Unlike HTML, XML does not have such inherent semantics at all. There is no prescribed method for rendering XML documents. Therefore, what it means to ‘browse’ XML is open to interpretation. For example, an XML document describing the characteristics of a machine part does not carry any information about how that information should be presented to a user. An application is free to use the data to produce an image of the part, generate a formatted text listing of the information, display the XML document's markup with a pretty color scheme, or restructure the data into a format for storage in a database, transmission over a network, or input to another program.
However, despite the fact that XML documents are purely descriptive data files, it is possible to ‘browse’ them in a sense, by rendering them with stylesheets. A stylesheet is a separate document that provides hints and algorithms for rendering or transforming the data in the XML document. HTML users may be familiar with Cascading Style Sheets (CSS). The CSS stylesheet language is general and powerful enough to be applied to XML documents, although it is oriented toward visual rendering of the document and does not allow for complex processing of the document's data. By associating an XML document with a CSS stylesheet, it may be possible to load an XML document in a CSS-aware web browser, and the browser may be able to provide some kind of rendering of it, even if the browser does not otherwise know how to read and process XML documents. (The Editor's Recipes site does exactly this.) However, not all web browsers will load an XML document correctly, and they are not required to recognise the XML markup that associates the document with a stylesheet, so one cannot assume that XML documents can be opened with just any web browser.
A more complex and powerful stylesheet language is XSLT, the Transformations part of the Extensible Stylesheet Language, which can be used to transform XML to other formats, including HTML, other forms of XML, and plain text. If the output of this transformation is HTML, it can be viewed in a web browser as any other HTML document would.
The degree of support for XML and stylesheets in web browsers varies greatly. Although loading and rendering XML in the browser is possible in some cases, it is not universally supported. Therefore, much XML content on the web is translated to HTML on the servers. It is this generated HTML that is delivered to the browsers. Most of Microsoft's web site, for example, exists as XML that is converted to HTML on the fly. The web browser never knows the difference.