Name
xml:space
Synopsis
xml:space='default|preserve'
Description
The xml:space
attribute indicates whether any whitespace inside the
element is significant and should not be altered by the XML
processor. The attribute can take one of two enumerated values:
-
preserve
The XML application honors all whitespace (new lines, spaces, and tabs) present within the element.
-
default
The XML processor is free to do whatever it wishes with the whitespace inside the element.
You should set xml:space
to preserve
only if you have an
element you wish to behave similar to the HTML <pre>
element, such as documenting source code.
Get Webmaster in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.