Multiple choice technology programming languages

What is the correct syntax of the declaration which defines the XML version?

  1. <xml version="1.0" />

  2. <?xml version="1.0"?>

  3. <?xml version="1.0" />

  4. None of the above

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

The XML declaration is . It's a processing instruction that must be at the very beginning of the document. The version is the only required attribute, and it uses the special and ?> delimiters characteristic of processing instructions.