Multiple choice xml

XML preserves white spaces

  1. True

  2. False

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

XML preserves whitespace in element content by default, unlike HTML which collapses multiple spaces. This means spaces, tabs, and newlines within elements are maintained as part of the document's character data. The xml:space attribute can further control whitespace handling in specific elements.

AI explanation

To answer this question, you need to understand the concept of XML and how it handles white spaces.

Option A) True - This option is correct. XML does preserve white spaces. In XML, white spaces such as spaces, tabs, and line breaks are considered significant and are preserved when the document is parsed. This means that the white spaces in the XML document are treated as part of the content and are not automatically ignored or removed.

Option B) False - This option is incorrect. XML does preserve white spaces, so the correct answer is option A.

The correct answer is A) True. XML preserves white spaces because they are considered significant.