SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
XML XPATH
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
processing-instruction
true() and false()
parent node
remove((item1, item2, item3...), position)
2. Returns hour value from time passed
hours-from-time(time)
/bookstore/*
string-length(str)
//book/title | //book/price
3. Returns length of current node string
substring-after(str1, str2)
month-from-date(date)
round(num)
string-length()
4. In str1, replaces all occurrences of str2 with str3
replace(str1, str2, str3)
concat(str1, str2, str3...)
.
substring-after(str1, str2)
5. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
books/book[last()]
index-of((item1, item2), item3...), target)
timezone-from-time(time)
child nodes
6. XSL is what we use to get from readable to _________
trees of nodes
upper-case(str)
usable document
seconds-from-time(time)
7. Returns time right now
current-time()
month-from-date(date)
remove((item1, item2, item3...), position)
index-of((item1, item2), item3...), target)
8. Converts string to upper case
@
substring(str,start)
syntax
upper-case(str)
9. Predicates work somewhat like _____________
'/'
year-from-date(date)
arrays and functions
hours-from-time(time)
10. Returns today's date
current-time()
//book[@isbn]
current-date()
substring(str,start)
11. The XPath division operator not "/" cuz "/" is used in path expressions
ceiling(num)
div
replace(str1, str2, str3)
/bookstore/book/title | //price
12. Converts string to lower case
substring-before(str1, str2)
true() and false()
attribute node
lower-case(str)
13. XML documents are treated as _________- so the root of the tree is called the document node or root node
year-from-date(current-date())
transforming
trees of nodes
//book/title | //book/price
14. Selects all title elements which have any attribute
upper-case(str)
round(num)
syntax
//title[@*]
15. Returns second value from time passed
string-join((str1, str2, str3), separator)
translate(str1, str2, str3)
seconds-from-time(time)
books/book[position()
16. Returns day value from date passed
day-from-date(date)
Predicates
substring-after(str1, str2)
string-length()
17. Returns boolean true or boolean false
true() and false()
substring(str1, start, len)
current-dateTime()
seconds-from-time(time)
18. The process of taking raw XML - adding XSL - and outputting a document file of some type
transformation
nodes
..
//*
19. Selects all title elements of the book element AND all price elements in the entire document
books/book[last()]
/bookstore/book/title | //price
substring(str,start)
month-from-date(date)
20. Returns next highest integer
ceiling(num)
minutes-from-time(time)
Xpath operators
instinct-values(item1, item2, item3...))
21. Returns true if str2 appears anywhere inside str1
matches(str1, str2)
books/book[position()
transforming
abs(num)
22. Returns next lowest integer
path
transforming
floor(num)
ends-with(str1, str2)
23. _______ have 3 primary relationships: parent - child - sibling
compare(arg1, arg2)
div
nodes
hours-from-time(time)
24. Returns substring from start position to end of string
criteria
year-from-date(current-date())
substring(str,start)
upper-case(str)
25. Returns length of passed string
boolean(arg)
starts-with(str1, str2)
@
string-length(str)
26. Selects all book elements with a child element "price" with values greater than 35
processor application
books/book[price > 35.00]
transforming
boolean(arg)
27. Returns absolute value (example abs(-2.5) returns 2.5
abs(num)
books/book[price > 35.00]
translate(str1, str2, str3)
index-of((item1, item2), item3...), target)
28. Selects first two book elements from the children of books element
ceiling(num)
Xpath operators
XSLT
books/book[position()
29. Concatenates strings together with separator between each string
path expressions
string-join((str1, str2, str3), separator)
criteria
/bookstore/book/title | //price
30. Replaces chars of str2 found in str1 with chars of str3
minutes-from-time(time)
translate(str1, str2, str3)
..
div
31. Use a | to select more than one _____ (means AND)
index-of((item1, item2), item3...), target)
transforming
year-from-date(date)
path
32. Selects all title AND price elements of all book elements
//book/title | //book/price
matches(str1, str2)
concat(str1, str2, str3...)
substring-before(str1, str2)
33. Returns everything after the first occurrence of str2
sequence
path
substring-after(str1, str2)
string(arg)
34. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
remove((item1, item2, item3...), position)
current-time()
/bookstore/*
substring(str,start)
35. A predicate is used by is used by adding square brackets [ ] to the end of a path or portion of a path - and adding ________ inside the brackets
criteria
/bookstore/book/title | //price
current-dateTime()
nodes
36. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
path expressions
processor application
string(arg)
'/'
37. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
attribute node
string(arg)
books/book[position()
nodes
38. Returns n-length substring from start position
Predicates
round(num)
substring(str1, start, len)
contains(str1, str2)
39. xpath function categories: numeric - string - boolea - date/time - ________
trees of nodes
timezone-from-time(time)
sequence
translate(str1, str2, str3)
40. Trims leading and trailing spaces
/bookstore/*
normalize-space(str)
abs(num)
concat(str1, str2, str3...)
41. Returns false or true
substring(str,start)
criteria
boolean(arg)
string(arg)
42. Returns logically rounded integer
round(num)
arrays and functions
seconds-from-time(time)
transforming
43. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
'//'
translate(str1, str2, str3)
insert-before((item1, item2, item3...), positionX, itemX)
path expressions
44. Returns month value out of date passed
month-from-date(date)
parent
substring(str1, start, len)
/bookstore/book/title | //price
45. Selects parent of current node
standard function
..
nodes
'/'
46. Returns 2008
year-from-date(current-date())
timezone-from-time(time)
@
//book/title | //book/price
47. selects first book element from the children of books element
books/book[1]
month-from-date(date)
floor(num)
books/book[position()
48. Selects last book element from the children of books element
replace(str1, str2, str3)
remove((item1, item2, item3...), position)
path expressions
books/book[last()]
49. Selects all book elements with an attribute isbn=
substring(str,start)
minutes-from-time(time)
year-from-date(date)
//book[@isbn]
50. Selects all title AND price elements in the entire document
matches(str1, str2)
//title | //price
ceiling(num)
transforming