adplus-dvertising
frame-decoration

Question

Which of the following X path expressions selects first four p elements in the document?

a.

(//p) [index() L = 4]

b.

(//p) [order() L = 4]

c.

(//p) [position() & It ; = 4]

d.

(//p) [last() & It ; = 4]

Answer: (c).(//p) [position() & It ; = 4]

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following X path expressions selects first four p elements in the document?