XPath commands Flashcards

(10 cards)

1
Q

How do you get a node?

A

/path/to/element

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

How do you get all the nodes?

A

//node, //, /node/node2

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

How do you indirectly get nodes?

A

/node1/node3

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

How do you get attributes?

A

/node/@Attribute

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

How do you get text?

A

/node/text()

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

How do you get everything?

A

//text()

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

How do you numerical reference?

A

/node[n]

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

How do you filter by node?

A

//Node1[Node2]

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

How do you filter by attribute?

A

//Node1[@Attribute=”Value”]

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