Multiple choice technology web technology

XML preserves white spaces

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

XML does NOT preserve whitespace. By default, XML processors normalize whitespace in element content (converting multiple spaces to a single space and trimming leading/trailing spaces). Whitespace in attributes is preserved. To preserve whitespace in elements, you must use the xml:space attribute with value 'preserve'. This behavior is different from HTML, where whitespace is typically preserved in display.