JN0-224 practice question 13 of 15

Which two standard logical operators does XPath support? (Choose two.)

Full set: 66 questions
Answer options
A: IOR
B: NOT Correct answer
C: AND Correct answer
D: MAMD
Correct Answer:
B. NOT; C. AND
Explanation

XPath (XML Path Language) is a query language for selecting nodes from an XML document. It includes a set of standard logical operators to create complex boolean expressions for filtering nodes. The core logical operators are and (logical conjunction), or (logical disjunction), and the not() function (logical negation). The options AND and NOT directly correspond to these standard XPath operators.

Why Incorrect

A. IOR is not a standard logical operator in the XPath specification; it is more commonly associated with bitwise operations in other languages.
D. MAMD is not a valid or recognized operator within the XPath language.

References

1. W3C Recommendation, "XML Path Language (XPath) Version 1.0":

Section 3.2, Booleans: This section explicitly defines the and and or operators. It states, "An OrExpr is evaluated by evaluating each AndExpr and converting its value to a boolean... An AndExpr is evaluated by evaluating each EqualityExpr and converting its value to a boolean..."

Section 4.3, Boolean Functions: This section defines the not() function. It states, "The not function returns true if its argument is false, and false otherwise."

2. Juniper Networks TechLibrary, Automation Scripting User Guide, "XPath Overview":

Section: XPath Expressions: This document states, "The XPath language includes the logical operators and, or, and not()." This directly confirms that and and not() are supported logical operators used within Junos automation scripts.

Scroll to Top