Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

strip-space

 

Syntax

Release Information

Statement introduced in version 1.0 of the SLAX language.

Description

Remove whitespace-only child text nodes from the source tree element nodes listed, but not from the child text nodes of the element node children. To perform whitespace stripping on the child text nodes of the element node children, specify the child nodes as separate entries in the strip-space element list. Specifying an asterisk removes whitespace-only child elements from all elements. A text node is considered whitespace-only if it includes only spaces, tabs, newlines, and carriage returns.

This statement must be defined as a top-level statement in the script. The default is to preserve all whitespace-only elements.

Attributes

element-listList of element names separated by spaces.

SLAX Example

The following example removes all whitespace-only text nodes from the source tree except for child elements of <user-context>:

Related Documentation