Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Axes question

 
Rakesh Gudur
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
What will following expressions evaluate to for the given XML document?
count//child::chapter@name="introduction"]/child::title/following-sibling::* )
-------------------XML Document----------------------
<book>
<author> abc </author>
<chapter name="introduction">
<title>chap 1</title>
<pages>100</pages>
</chapter>
<chapter name="starting">
<version>1.1</version>
<title>chap 2 </title>
<pages>200</pages>
</chapter>
</book>
Answers:
A: 1
B: 2
C: 3
D: 4
E: error
Can any one explain the answer. The answer given in the XML Whiz is 1
Thanks,
Rakesh.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic