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. Selects all book elements with an attribute isbn=
compare(arg1, arg2)
//book[@isbn]
normalize-space(str)
translate(str1, str2, str3)
2. Returns absolute value (example abs(-2.5) returns 2.5
books/book[1]
Predicates
abs(num)
attribute node
3. Selects all title elements of the book element AND all price elements in the entire document
/bookstore/book/title | //price
starts-with(str1, str2)
contains(str1, str2)
Xpath operators
4. Returns n-length substring from start position
substring(str1, start, len)
replace(str1, str2, str3)
contains(str1, str2)
Predicates
5. Returns false if true - true if false (negative logic)
Predicates
timezone-from-time(time)
not(arg)
ceiling(num)
6. Returns true if str1 starts with str2
boolean(arg)
starts-with(str1, str2)
contains(str1, str2)
processing-instruction
7. Returns day value from date passed
substring-before(str1, str2)
round(num)
@
day-from-date(date)
8. XML documents are treated as _________- so the root of the tree is called the document node or root node
floor(num)
trees of nodes
substring(str,start)
..
9. Returns year value out of the date passed
ceiling(num)
month-from-date(current-date())
year-from-date(date)
div
10. Selects all the child nodes of the bookstore element
/bookstore/book/title | //price
translate(str1, str2, str3)
floor(num)
/bookstore/*
11. Use a | to select more than one _____ (means AND)
/bookstore/book/title | //price
path
/bookstore/*
//title[@*]
12. Converts value to a string
'/'
string(arg)
translate(str1, str2, str3)
'//'
13. Returns next lowest integer
string-join((str1, str2, str3), separator)
floor(num)
timezone-from-time(time)
books/book[1]
14. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
concat(str1, str2, str3...)
'/'
books/book[last()]
/bookstore/book/title | //price
15. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
books/book[price > 35.00]
normalize-space(str)
contains(str1, str2)
index-of((item1, item2), item3...), target)
16. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
child nodes
Xpath operators
transforming
Predicates
17. Returns true if str1 contains str2
round(num)
books/book[position()
contains(str1, str2)
current-dateTime()
18. Returns today's date
insert-before((item1, item2, item3...), positionX, itemX)
//title | //price
current-date()
year-from-date(date)
19. Returns everything after the first occurrence of str2
substring-after(str1, str2)
criteria
concat(str1, str2, str3...)
month-from-date(current-date())
20. Returns substring from start position to end of string
index-of((item1, item2), item3...), target)
substring(str,start)
translate(str1, str2, str3)
//book/title | //book/price
21. Returns complete date/time
current-dateTime()
lower-case(str)
parent
usable document
22. Returns boolean true or boolean false
/bookstore/book/title | //price
hours-from-time(time)
true() and false()
contains(str1, str2)
23. XSL is what we use to get from readable to _________
day-from-date(date)
usable document
substring-after(str1, str2)
timezone-from-time(time)
24. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
string-join((str1, str2, str3), separator)
substring(str,start)
transforming
floor(num)
25. Concatenates strings together with separator between each string
string-join((str1, str2, str3), separator)
nodes
abs(num)
instinct-values(item1, item2, item3...))
26. Returns false or true
path
XSLT
not(arg)
boolean(arg)
27. Returns second value from time passed
transformation
current-time()
processor application
seconds-from-time(time)
28. Selects all elements in the document
trees of nodes
div
//*
path expressions
29. Returns minute value from time passed
substring(str,start)
books/book[1]
minutes-from-time(time)
round(num)
30. Selects all title elements which have any attribute
path expressions
//title[@*]
substring(str,start)
books/book[price > 35.00]
31. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
true() and false()
insert-before((item1, item2, item3...), positionX, itemX)
//title[@*]
instinct-values(item1, item2, item3...))
32. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
remove((item1, item2, item3...), position)
floor(num)
month-from-date(date)
processor application
33. Returns time right now
year-from-date(date)
current-time()
Xpath operators
books/book[last()]
34. The XPath division operator not "/" cuz "/" is used in path expressions
div
string-length()
sequence
//title | //price
35. Trims leading and trailing spaces
books/book[last()]
normalize-space(str)
.
year-from-date(current-date())
36. xpath function categories: numeric - string - boolea - date/time - ________
arrays and functions
div
sequence
parent node
37. Sibling nodes all have the same ______
parent
processing-instruction
div
true() and false()
38. Selects all title AND price elements of all book elements
//book/title | //book/price
processing-instruction
books/book[price > 35.00]
parent node
39. Travels from current node to select nodes that match - wherever they are
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
40. every element and every attribute have just one _________
processing-instruction
hours-from-time(time)
parent node
books/book[price > 35.00]
41. Converts string number to numeric value
books/book[1]
number(arg)
//title | //price
syntax
42. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
round(num)
.
/bookstore/*
path expressions
43. Returns length of current node string
insert-before((item1, item2, item3...), positionX, itemX)
string-length()
upper-case(str)
remove((item1, item2, item3...), position)
44. Selects first two book elements from the children of books element
substring-before(str1, str2)
//book[@isbn]
books/book[position()
/bookstore/*
45. XPath is a major element in _______
XSLT
syntax
upper-case(str)
path
46. selects first book element from the children of books element
syntax
books/book[1]
substring-before(str1, str2)
string-length()
47. Returns timezone value from time passed
sequence
substring-after(str1, str2)
string(arg)
timezone-from-time(time)
48. Returns true if str2 appears anywhere inside str1
matches(str1, str2)
trees of nodes
books/book[1]
starts-with(str1, str2)
49. Returns hour value from time passed
..
month-from-date(date)
hours-from-time(time)
//book[@isbn]
50. Converts string to lower case
lower-case(str)
year-from-date(current-date())
remove((item1, item2, item3...), position)
div