Feedback

  • Contents
 

Viewing XML in Internet Explorer or Edge

The tree structure of XML documents is easy to understand when seen visually. Microsoft's Edge and Internet Explorer 6 (or later) browsers provide a built-in parser that you can use parse, validate, and view XML files.

Tip: To open an XML file, drag and drop an XML file from Windows Explorer into your browser's document window. Or, double-click an .xml filename in Windows Explorer.

The figure below shows the sample movie database (sample1.xml) after it has been opened in Notepad and Internet Explorer. As you can see, Notepad displays the statements appear as they were entered. Edge and Internet Explorer display a tree of elements, which makes the content easier to view.

Edge and Internet Explorer automatically add DHTML code so that you can expand or collapse nodes in the tree. Internet Explorer doesn't allow you to do much besides view XML files. However, if you save your XML file with an extension of .htm or .html, IE will render the data contained in the XML file.