2

There couldn't possibly be any use in current behaviour of stripping all tags and displaying non-tag text as one big block.

Any way to get it to display useful content? It would be amazing if it would have highlighting etc., but just displaying it as plain text should be good enough.

2
2

The View Source command will do exactly what you want.

It can be found from the right click context menu inside of Firefox (image found from Google search):

View Page Source

1
  • Nice simple solution. Shortcut is Ctrl + U – roblogic Apr 5 '17 at 0:54
1

I'm on Ubuntu with Firefox 3.6.10 and xml files appear properly formatted (tagged, highlighted and indented). Sounds like your mime-type properties aren't being recognized properly (ie not Firefox's fault).

1

Any way to get it to display useful content? It would be amazing if it would have highlighting etc., but just displaying it as plain text should be good enough.

Without a test case I can't duplicate this behaviour. It shows a parse-tree by default in the test case I set up.

There couldn't possibly be any use in current behaviour of stripping all tags and displaying non-tag text as one big block.

There's would be plenty of justification. text/xml is a valid format for things that Fx can render - not simply deliver. So, as a result, it renders them - it doesn't treat them as text. In fact, by stating the document is text/xml, you are explicitly telling Fx NOT to treat them as plain text.

3
  • Unless xml has associated stylesheet, or some mime type more generic than text/xml or application/xml, how can it be formatted? I found that I can use Force Content-Type extension to map all application/xml to text/plain on certain url regexp - it's an adequate workaround. – taw Oct 8 '10 at 7:52
  • However Fx wants to handle it. A text file can be turned into an image or maybe even 3D shaders if the renderer wants, it doesn't make it any less correct to ajudge it as also being text/plain. Consider MathML or even SVG. Mime-types are semantics, they can be ignored. A document might have a million different ways of being displayed depending on its contents but only one mime-type. – Rushyo Nov 17 '10 at 23:43
  • I think it's curious you pull me up for apparently not answering the question (it is implied my answer is 'no, and here's why:') but don't mind the fact the question is actually dependent on subjective interpretation as to what is 'useful', making an objective answer presumptuous from the start (hence why I didn't explicitly state 'no' and left it to be implied). Cannae win either way. – Rushyo Sep 2 '14 at 13:43
1

Using Firefox 70 on Windows, normal XML display is a tree with highlighted tags.

Sometimes, adding some plugins can make this behaviour to change, displaying the XML as HTML instead, this is hiding tags and displaying only content, if any.

  • In this case a workaround is to View Source oh the XML, which will always show plain text content, but also with highlighted tags.
  • Another workaround is using a different browser, like Chrome, Opera, etc.
  • Some people say this behaviour is because of XML content, but since it worked before with the same content, clearly it's something that changed in Firefox. You can try disabling plugins temporary until identify the evil one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.