xml:space

Started by beingchinmay, 08-22-2016, 04:27:05

Previous topic - Next topic

beingchinmayTopic starter

This attribute specifies to an application how it should handle whitespace. The valid values are preserve and default. When set to default, the application handles whitespace as it normally does. A value of preserve instructs the application that it must preserve all whitespace within the context of the element on which the attribute is set. For example:

Quote<Description xml:space="preserve">
<a>This</a>
<b>is</b>
<c>the</c>
<d>description</d>
</Description>

The value of preserve should instruct the application to preserve the whitespace within the description content. If this were set to default, the application may or may not preserve whitespace. It would depend upon its default behavior.