exam questions

Exam 300-535 All Questions

View all questions & answers for the 300-535 exam

Exam 300-535 topic 1 question 28 discussion

Actual exam question from Cisco's 300-535
Question #: 28
Topic #: 1
[All 300-535 Questions]


Refer to the exhibit. Using the provided XML snippet, which Xpath expression prints "Jane"?

  • A. //employee[1]/firstName/value()
  • B. //employee[0]/firstName/value()
  • C. //employee[1]/firstName/text()
  • D. //employee[0]/firstName/text()
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
endermao
Highly Voted 4 years, 1 month ago
Correct answer should be C, xpath has a index number starting from 1, and I have run the snippet using lxml in python confirms index 1 is correct: from lxml import etree html = etree.parse('employee.html') print type(html) result = html.xpath('//employee[1]/firstName/text()') print result Output: <type 'lxml.etree._ElementTree'> ['Jane']
upvoted 10 times
kkass
2 years, 4 months ago
i have tested it. you are correct
upvoted 2 times
...
...
Dreamnetdev
Most Recent 8 months ago
Selected Answer: C
xpath indexing starts at 1
upvoted 2 times
...
charlesch
2 years, 11 months ago
Selected Answer: C
XPATH indexing starts with 1
upvoted 2 times
...
chimee
4 years, 1 month ago
C is correct
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...