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 (newlines, 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 XML Pocket Reference 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.