- Shuffle
Toggle OnToggle Off
- Alphabetize
Toggle OnToggle Off
- Front First
Toggle OnToggle Off
- Both Sides
Toggle OnToggle Off
Front
How to study your flashcards.
Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key
Up/Down arrow keys: Flip the card between the front and back.down keyup key
H key: Show hint (3rd side).h key
![]()
PLAY BUTTON
![]()
PLAY BUTTON
![]()
26 Cards in this Set
- Front
- Back
|
Selecting Nodes
|
The node is selected by following a path or steps.
|
|
Path expression: nodename
|
Selects all child nodes of the named node
|
|
Path expression: /
|
Selects from the root node
|
|
Path expression: //
|
Selects nodes in the document from the current node that match the selection no matter where they are
|
|
Path expression: .
|
Selects the current node
|
|
Path expression: ..
|
Selects the parent of the current node
|
|
Path expression: @
|
Selects attributes
|
|
Predicates
|
Predicates are used to find a specific node or a node that contains a specific value. Predicates are always embedded in square brackets.
|
|
Sample Path Expression: /bookstore/book[1]
|
RESULT: Selects the first book element that is the child of the bookstore element.
|
|
SamplePath Expression: /bookstore/book[last()]
|
RESULT: Selects the last book element that is the child of the bookstore element
|
|
/bookstore/book[last()-1]
|
RESULT: Selects the last but one book element that is the child of the bookstore element
|
|
/bookstore/book[position()<3]
|
RESULT: Selects the first two book elements that are children of the bookstore element
|
|
//title[@lang]
|
RESULT: Selects all the title elements that have an attribute named lang
|
|
Sample Path Expression: //title[@lang='eng']
|
RESULT: Selects all the title elements that have an attribute named lang with a value of 'eng'
|
|
Sample Path Expression: /bookstore/book[price>35.00]
|
RESULT: Selects all the book elements of the bookstore element that have a price element with a value greater than 35.00
|
|
Sample Path Expression: /bookstore/book[price>35.00]/title
|
RESULT: Selects all the title elements of the book elements of the bookstore element that have a price element with a value greater than 35.00
|
|
Wildcard: *
|
Matches any element node
|
|
Wildcard: @*
|
Matches any attribute node
|
|
Wildcard: node()
|
Matches any node of any kind
|
|
/bookstore/*
|
RESULT: Selects all the child nodes of the bookstore element
|
|
//*
|
RESULT: Selects all elements in the document
|
|
//title[@*]
|
RESULT: Selects all title elements which have any attribute
|
|
Selecting Several Paths
|
By using the | operator in an XPath expression you can select several paths.
|
|
//book/title | //book/price
|
RESULT: Selects all the title AND price elements of all book elements
|
|
//title | //price
|
RESULT: Selects all the title AND price elements in the document
|
|
//book/title | //book/price
|
RESULT: Selects all the title elements of the book element of the bookstore element AND all the price elements in the document
|