message.removeWhitespace¶
Signature: message.removeWhitespace(includeEOL)
Returns: void
Remove all extra whitespace from the XML message, including end of line characters if includeEOL is true.
Note
This method only applies to XML formatted messages.
Parameters¶
| Type | Name | Description | Default |
|---|---|---|---|
| Boolean | includeEOL | remove end of line characters as well |
Example¶
// Example: Remove extra whitespace from an XML document.
// Sample XML message structure (with extra whitespace)
message = qie.createXMLMessage(
"<root> " +
" <employee>" +
" <name>Thomas</name>" +
" </employee> " +
"</root>"
);
// Remove all extra whitespace (including end-of-line characters)
message.removeWhitespace(true); //<root><employee><name>Thomas</name></employee></root>