300-435 Question 49
Single answerYou are using YANG Suite to generate an XML instance based on a YANG model for configuring an interface on a Cisco device. The model defines the node structure as follows: 'interface' contains 'name', 'type', and 'enabled' as child elements. Which of the following XML instances correctly represents this structure?
- A
GigabitEthernet0/1 ethernetCsmacd true - B
GigabitEthernet0/1 true ethernetCsmacd - C
ethernetCsmacd GigabitEthernet0/1 - D
GigabitEthernet0/1 ethernetCsmacd
Show answer and explanation
Correct answer: A
Explanation
The correct XML instance must adhere to the hierarchy and structure defined in the YANG model. The 'interface' node must contain the 'name', 'type', and 'enabled' child elements, and all these elements must be included in the correct structure. Option 1 is the only answer that satisfies these requirements.
- A. Correct.
This XML instance correctly adheres to the hierarchy of the YANG model and includes all required child elements: 'name', 'type', and 'enabled', in the correct structure.
- B. Incorrect.
Although this XML instance includes all required child elements, it does not follow the correct structural hierarchy as defined by the YANG model.
- C. Incorrect.
This XML instance has the required child elements but not in the correct structural order and is missing the 'enabled' element.
- D. Incorrect.
This XML instance is missing the 'enabled' element, which is a required child element as per the YANG model.