Firefox stopped displaying XML files. How to fix

firefoxxml

I've been happily using Firefox version 56 for a long time to view XML tree by just clicking the .xml file. But now, suddenly, Firefox switched to only display the concatenation of the text content of XML elements.

As an example, if the XML document has :

<rootElt>
   <myElt>Some text.</myElt>
   <otherElt>Another text.</otherElt>
</rootElt>

Instead of showing that document tree, Firefox only shows:

Some text.Another text.

I haven't changed any configurations and It happened overnight with no apparent reason. Other browsers, including Firefox Dev Edition don't show this problem.

I am not interested in updating version 56 because that would break my add-ons. Is there any fix for this issue on this version?

Best Answer

According to this post, you have to add the <Doctype> tag to your XML document.

As a workaround, you can also right-click the page and select View Page Source.

Related Question