XML parsers preserve whitespace in documents by default unless explicitly configured to trim it. The XML specification treats whitespace as significant content, not something to be automatically truncated. This is different from HTML where whitespace is often normalized.