In conformance with the W3C
XML specification [XML1.0], optional white-space characters that
are contained in elements that have element content (in other words that must
contain elements only but not text) are ignored. This applies to the following
white-space and end-of-line (EOL) [UNICODE] characters:
�
HORIZONTAL TABULATION (0x0009)
�
LINE FEED (0x000A)
�
CARRIAGE RETURN (0x000D)
�
SPACE (0x0020)
For any other element, white-spaces are preserved by default.
Unless otherwise stated, there is no special processing for any of the four
white-space characters. For some elements, different white-space processing may
take place, for example the paragraph element.
The XML specification also requires that any of the four
white-space characters that is contained in an attribute value is normalized to
a SPACE character.
One of the following characters may be used to represent line
ends:
�
LINE FEED
�
CARRIAGE RETURN
�
The sequence of the characters CARRIAGE RETURN
and LINE FEED
Conforming to the XML specification, all the possible line
ends are normalized to a single LINE FEED character.
As a consequence of the white-space and EOL processing rules,
any CARRIAGE RETURN characters that are contained either in the text content of
an element or in an attribute value must be encoded by the character entity 
.
The same applies to the HORIZONTAL TABULATION and LINE FEED characters if they
are contained in an attribute value.