Declarative-Languages / Declarative Language Practical 2 / Question_2_Answers.txt
Question_2_Answers.txt
Raw
ONLY PROVIDE THREE (3) ANSWERS FOR QUESTION 2 (XPATH)!
------------------------------------------------------

Use election.xml for input.

Each answer should be a complete XPath expression
and should be inserted below beside the specific question number.
(Do NOT provide the results returned by each expression.)


Answer BOTH 2a and 2b...

2a) /election-results/district[@name='103 - Sudbury']/candidate/@name

2b) /election-results/district[candidate/@party='CNS']/@name


Answer ONE of either 2c or 2d...

2c) 

2d) count(/election-results/district[count(candidate) > 8])