Search Header Logo

XPath Quiz Final

Authored by Kevin Albania

Computers

University

Used 4+ times

XPath Quiz Final
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is XPath?

A programming language used for styling XML documents

A query language used to select nodes from an XML document

A markup language used for defining custom tags in HTML

A protocol for transferring XML data over a network

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does XPath use to select nodes or node-sets in an XML document?

CSS selectors

Path expressions

SQL queries

HTML tags

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which XPath expression is used to select all elements in an XML document?

//*

/root/*

//element()

/*/*

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which XPath expression selects all <book> elements where the <price> is greater than 25?

//book[price > 25]

//book[@price > 25]

//book[price=25]

//book/price > 25

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which XPath expression selects a <book> element with an id attribute equal to "b1"?

//book[id="b1"]

//book[@id="b1"]

//book/#id="b1"

//book[id=='b1']

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which XPath expression selects the <author> of the <book> with the <title> "Mastering XML"?

//author[title="Mastering XML"]

//book/title="Mastering XML"/author

//book[title="Mastering XML"]/author

//book[@title="Mastering XML"]/author

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which XPath expression selects the title of the first <book> element?

//book[1]/title

//title[1]/book

/book[1]/title

//book/title[1]

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?