How to View XML Documents

It is a well-known fact that you cannot view XML documents on its own, because it has not style information. There are only two ways to view XML documents on screen.

  1. Display in web browser like you do for webpages.
  2. Convert the XML information into HTML for display.

It is true that there is no style information with XML still it is visible in the browser when you open the doc.

Hierarchical View

The XML document can be viewed in any browser, without any style information. Only the hierarchies of elements and tags are visible.

Figure 1 - A Hierarchical View XML document in Opera Brower.
Figure 1 – A Hierarchical View XML document in Opera Brower.

When you open the XML in hierarchical view, only the outline of the document is visible and a warning indicating that no stylesheet is being rendered.

XHTML Viewing

The XHTML is another standard that conforms to the XML strict standards, and it has some formatting for elements. It guarantees that the information and tags are well-formed before rendering the style information.

Figure 2 - XHTML shows formatted information from XML document.
Figure 2 – XHTML shows formatted information from XML document.

In the above example, I have tried to open the XML information from an XHTML document, and it hides the hierarchical view of XML and present a built-in style for XML data. Note how, address field is italicized, and course information is in bold.


Customized Software to Read XML information

Not all information can be rendered through XML, because XML itself helps create other markup languages. Some software is required to show the custom information.

Jumbo software uses Chemical Markup Language to display molecule structure , Math ML shows formulas through XML and MathML extension is required to display that kind of information.

You can visit MathML website for more information: MathML Core (

General Purpose Browsers

A browser is the ultimate destination to view HTML or XML files, if not consumed by an application. There are several general-purpose browsers and I cannot list them all, which support XML technologies.

  1. Google Chrome
  2. Mozilla Firefox
  3. Opera
  4. Microsoft Edge (Internet Explorer)
  5. Amaya
  6. Safari


In this article, you have learned ways to view XML document with or without style information. The browser choice or technique is your decision, and you must choose according to your need and satisfaction.


Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.