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. 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
books/book[last()]
books/book[position()
standard function
criteria
2. Returns true if str1 ends with str2
parent
ends-with(str1, str2)
floor(num)
//*
3. Selects last book element from the children of books element
books/book[last()]
string-length(str)
arrays and functions
day-from-date(date)
4. Returns length of passed string
/bookstore/book/title | //price
string-length(str)
replace(str1, str2, str3)
path
5. Returns minute value from time passed
//book/title | //book/price
.
attribute node
minutes-from-time(time)
6. XML documents are treated as _________- so the root of the tree is called the document node or root node
trees of nodes
div
transformation
floor(num)
7. Returns true if str2 appears anywhere inside str1
matches(str1, str2)
index-of((item1, item2), item3...), target)
'/'
books/book[last()]
8. Selects all book elements with an attribute isbn=
syntax
floor(num)
processing-instruction
//book[@isbn]
9. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
substring(str,start)
concat(str1, str2, str3...)
remove((item1, item2, item3...), position)
//title[@*]
10. Returns complete date/time
'//'
boolean(arg)
contains(str1, str2)
current-dateTime()
11. Returns length of current node string
year-from-date(date)
path expressions
string-length()
instinct-values(item1, item2, item3...))
12. Returns absolute value (example abs(-2.5) returns 2.5
abs(num)
current-time()
//book[@isbn]
substring(str1, start, len)
13. The XPath division operator not "/" cuz "/" is used in path expressions
child nodes
month-from-date(date)
path expressions
div
14. Selects all the child nodes of the bookstore element
month-from-date(date)
/bookstore/*
compare(arg1, arg2)
boolean(arg)
15. Returns hour value from time passed
string(arg)
syntax
hours-from-time(time)
lower-case(str)
16. Selects all book elements with a child element "price" with values greater than 35
lower-case(str)
starts-with(str1, str2)
books/book[price > 35.00]
ends-with(str1, str2)
17. Concatenates strings together with separator between each string
translate(str1, str2, str3)
usable document
upper-case(str)
string-join((str1, str2, str3), separator)
18. In str1, replaces all occurrences of str2 with str3
number(arg)
replace(str1, str2, str3)
string-length(str)
string-join((str1, str2, str3), separator)
19. Converts string number to numeric value
@
books/book[1]
number(arg)
remove((item1, item2, item3...), position)
20. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
normalize-space(str)
criteria
month-from-date(current-date())
21. Converts value to a string
attribute node
//*
string(arg)
substring(str1, start, len)
22. Returns next highest integer
contains(str1, str2)
ceiling(num)
div
round(num)
23. Returns month value out of date passed
month-from-date(date)
current-dateTime()
/bookstore/*
substring(str,start)
24. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
substring-before(str1, str2)
//book/title | //book/price
index-of((item1, item2), item3...), target)
string(arg)
25. Converts string to upper case
processor application
string-length(str)
floor(num)
upper-case(str)
26. Returns today's date
path expressions
current-date()
..
minutes-from-time(time)
27. Converts string to lower case
lower-case(str)
standard function
not(arg)
transformation
28. Returns false if true - true if false (negative logic)
Xpath operators
remove((item1, item2, item3...), position)
not(arg)
trees of nodes
29. XPath is a major element in _______
processor application
XSLT
current-date()
books/book[last()]
30. Selects current node
minutes-from-time(time)
.
year-from-date(date)
trees of nodes
31. selects first book element from the children of books element
floor(num)
parent node
transformation
books/book[1]
32. Selects all elements in the document
substring-after(str1, str2)
//*
remove((item1, item2, item3...), position)
Predicates
33. Selects attributes
Xpath operators
standard function
@
starts-with(str1, str2)
34. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
'//'
transforming
round(num)
string(arg)
35. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
number(arg)
string-length(str)
boolean(arg)
insert-before((item1, item2, item3...), positionX, itemX)
36. Selects all title AND price elements in the entire document
//title | //price
starts-with(str1, str2)
arrays and functions
parent node
37. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
Xpath operators
ceiling(num)
transforming
substring(str,start)
38. Returns true if str1 contains str2
string-length(str)
criteria
replace(str1, str2, str3)
contains(str1, str2)
39. Returns true if str1 starts with str2
starts-with(str1, str2)
string(arg)
compare(arg1, arg2)
substring-after(str1, str2)
40. Selects all title elements which have any attribute
//title[@*]
current-dateTime()
substring-after(str1, str2)
sequence
41. Selects parent of current node
index-of((item1, item2), item3...), target)
..
current-date()
string(arg)
42. Predicates work somewhat like _____________
arrays and functions
current-time()
string-join((str1, str2, str3), separator)
parent node
43. Sibling nodes all have the same ______
round(num)
month-from-date(date)
parent
current-dateTime()
44. Use a | to select more than one _____ (means AND)
path expressions
current-dateTime()
path
Predicates
45. Returns everything before the first occurrence of str2
standard function
substring-before(str1, str2)
hours-from-time(time)
floor(num)
46. ________ allow more specific selections within the XPath
div
syntax
Predicates
parent node
47. The process of taking raw XML - adding XSL - and outputting a document file of some type
minutes-from-time(time)
Xpath operators
remove((item1, item2, item3...), position)
transformation
48. Returns second value from time passed
substring(str1, start, len)
/bookstore/book/title | //price
trees of nodes
seconds-from-time(time)
49. Returns October or 10 ?
month-from-date(current-date())
translate(str1, str2, str3)
..
year-from-date(current-date())
50. Returns time right now
year-from-date(date)
XSLT
current-time()
trees of nodes