View Single Post
Old 12-18-2015, 04:07 PM   #24
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by eschwartz View Post
It is XML. The spaces don't matter.
whitespace in XML/HTML only matters inside an element, and then it is collapsed down to one space.
Not strictly true. In some elements, e.g. pre, whitespace is preserved. Also, space between inline elements is significant, as is whitespace around comments. (I know this because I was the guy who fixed the bug on that last one in libxml2's HTML parser many years ago.) And with a proper parser, you can add xml:space="preserve" to any arbitrary element to preserve whitespace within in.

But yes, that's roughly true in the general case.
dgatwood is offline   Reply With Quote