JNCIA-DevOps: Juniper Networks Certified Associate – Automation (2021) — Question 10
What is an example of correct XML syntax?
Answer options
- A. <Devices><hostname>vMX1<Devices/>
- B. <Devices><hostname>vMX1</hostname><Devices/>
- C. <Devices><hostname>vMX1</hostname></Devices>
- D. <Devices><hostname>vMX1<Devices/></hostname>
Correct answer: B
Explanation
Option B is correct because it properly closes the <hostname> tag before closing the <Devices> tag. Option A is incorrect due to the unclosed <hostname> tag and improperly nested elements. Option C, while it has correct syntax, contains an extra closing tag that does not match the opening tag structure. Option D also has an unclosed <Devices/> tag within the <hostname> element, which is incorrect.