XML Flashcards

1
Q

XPATH /

A

Selects from the root node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

//

A

Selects nodes in the document from the current node that match the selection no matter where they are

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

.

A

Selects the current node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

..

A

Selects the parent of the current node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

@

A

Selects attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

bookstore

A

Selects all nodes with the name “bookstore”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

/bookstore

A

Selects the root element bookstore

Note: If the path starts with a slash ( / ) it always represents an absolute path to an element!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

bookstore/book

A

Selects all book elements that are children of bookstore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

//book

A

Selects all book elements no matter where they are in the document

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

bookstore//book

A

Selects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

//@lang

A

Selects all attributes that are named lang

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

//title[@lang]

A

Selects all the title elements that have a “lang” attribute with a value of “en”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

/bookstore/book[price>35.00]

A

Selects all the book elements of the bookstore element that have a price element with a value greater than 35.00

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

*

A

Matches any element node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

@*

A

Matches any attribute node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

//*

A

Selects all elements in the document

17
Q

//title[@*]

A

Selects all title elements which have at least one attribute of any kind

18
Q

//title | //price

A

Selects all the title AND price elements in the document