This is a recommendation for the behavior of XML parsers in regards to white space appearing in the source document, and what portions are to be delivered to the application. This RFC is published and made available for public review in an open process. We encourage parser developers to take part in formulating the final specification and to abide by it, in an effort to provide a uniform behavioral model that will allow applications and documents to be portable across a variety of parsers. The Problem White space is defined by XML as any character of the set space, tab and new-line.
White space serves two distinct purposes.
The first is to introduce spaces and line breaks into the element content in a manner that has semantic significance for the XML application, whether this is to separate word and textual parts, to describe visual formatting, or otherwise. The second is the use of white space to visually format the document in its source form, e.g. when using a text editor to edit an XML file. Such use of white space is purely to assist the reader or editor of the document. This white space is not part of the information conveyed by the document and bears no semantic significance for the XML application. An XML parser that regards all white space as part of the element content and as conveying information might, with liberally formatted documents, deliver redundant spaces to the application, affecting performance and memory consumption.