With the XML file of Exercise R25.10 , give XPath expressions that yield a. the value

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 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:

image text in transcribed

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)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: