I would like to throw in my two cents:
Firefox isn't "lying," though according to the above bug there are some
things that need to hammered out. If you are writing XML to be copy-pasted,
I would advise using HTML and PRE tags to maintain whitespace & indentation
- this way you can make every browser user happy. XML isn't meant to be
viewed in any form by a browser, so it is up to the browser developers to
decide how to present it. Viewing the source is usually where I want to go
to copy any kind of code, and in the case of XML I would certainly go there
first. As stated before, XML is supposed to be a format for organizing data
for machines to interperet, not humans - thats why its used. If you want
readable XML, indentation and all, I would again reccommend some kind of
HTML to render your XML as text, at least until this bug is worked out in
FF. Even then, that won't fix the other browsers that aren't doing this
BEWARE: Your browser may not render files the way you want! So, either stick
to IE, write a FF extension, help fix this bug, or make some other
If you NEED something to display a certain way, you should never rely on
someone else's code (i.e., the code that makes up FF, Safari, etc) to do it
properly - always assume that you must make the data presentable yourself
via means that will render correctly across all browsers.
On Mon, Sep 8, 2008 at 7:09 PM, Martijn wrote:
> This sounds like https://bugzilla.mozilla.org/show_bug.cgi?id=175946 ,
> On Mon, Sep 8, 2008 at 10:55 PM, clintonG wrote:
> > I've just learned Internet Explorer is the only browser that actually
> > correctly renders raw XML as the developer intends. Firefox lies and
> > the XML prolog and then displays a styled tree. This of course will
> > a person who does not know they must view source to copy and paste the
> > XML. Furthermore, the raw XML in the source no longer has white-space
> > indentation preserved.
> > Can Firefox be configured somehow to stop lying and render raw XML
> > correctly? XML is supposed to be a "READABLE" file format and discovering
> > this has been a big surprise that I observer Opera and Safari also fail
> > do correctly.
> > So either Internet Explorer renders raw XML correctly maintaining the
> > objective of generating a "READABLE" file format or all of the other
> > browsers are FUBAR.
> > What's the facts here and how do I provide people with VALID raw XML they
> > can read that has well-formed white-space and indentation as a
> > tree as XML was intended to be displayed when it was created?
> > _______________________________________________
> > dev-web-development mailing list
> > firstname.lastname@example.org
> > https://lists.mozilla.org/listinfo/dev-web-development
> Martijn Wargers - Help Mozilla!
> irc://irc.mozilla.org/qa - /nick mw22
> dev-web-development mailing list