What is White Space?
A version of this page is also available for
4/8/2010
White space refers to characters in an XML document, such as spaces and tabs, that are invisible when represented in a text editor like Notepad or an application like Microsoft Internet Explorer.
Character | Entity representation |
---|---|
Space |
|
Carriage return |
|
Tab |
|
Line feed (newline) |
|
Note
A nonbreaking space ( 
, hexadecimal  
) is not considered white space because that content is not to be interpreted as an allowable place to break to a new line. In a Web environment, practical uses for the nonbreaking space are limited; generally, you want the browser to wrap long lines.
You can control white space output in an XML document by using Document Object Model (DOM) or XSL Transformation (XSLT) functionality.