Referring to the exhibit below, you are asked to capture a list of inactive users on each router in the network.
Which XPath concept allows you to select only the inactive user elements?
In Junos XML configuration data, a configuration element that has been deactivated (but remains present in the configuration) is marked with an inactive="inactive" attribute on its opening tag — as shown for USER_2 in the exhibit (<user inactive="inactive">). To select only those <user> elements, an XPath expression must filter on this attribute value using attribute-based predicate syntax (the @ notation, e.g., user[@inactive='inactive']). This filtering mechanism is the XPath 'attribute' concept, which lets you test or select nodes based on the presence or value of an XML attribute, as opposed to axes (tree navigation relationships), operators (arithmetic/comparison/logical operations), or namespaces (qualifying element/attribute names by namespace URI).
Community Discussion