Question: With the XML file of Exercise R25.10 , give XPath expressions that yield a. the value of the first coin. b. the number of
With the XML file of Exercise •• R25.10 , give XPath expressions that yield
a. the value of the first coin.
b. the number of coins.
c. the name of the first child element of the first coin element.
d. the name of the first attribute of the first coin’s name element. (The expression @* selects the attributes of an element.)
e. the value of the lang attribute of the second coin’s name element.
Data from exercise R25.10
Consider the XML file:

What are the values of the following XPath expressions?
a. /purse/coin[1]/value
b. /purse/coin[2]ame
c. /purse/coin[2]ame/@lang
d. name(/purse/coin[2]/*[1])
e. count(/purse/coin)
f. count(/purse/coin[2]ame)
0.5 half dollar 0.25 quarter
Step by Step Solution
3.41 Rating (157 Votes )
There are 3 Steps involved in it
Based on the XML structure provided here are the XPath expressions that would yield the following results a The value of the first coin XPath expressi... View full answer
Get step-by-step solutions from verified subject matter experts
