What is the correct declaration syntax for the version of XML document?
-
<?xml version="1.0" />
-
<?xml version="1.0"?>
-
<xml version="1.0" />
B
Correct answer
Explanation
XML declarations are processing instructions that must start with and end with `?>`. The correct syntax is where the xml keyword is followed by the version attribute. Option A incorrectly closes with /> (processing instructions don't use self-closing tags), and Option C uses element tags `` instead of processing instruction syntax.