previous
|
start
|
next
Parsing XML Documents
Consider the following XPath, applied to the document in Figure 4:
/items/item[1]/quantity
it selects the quantity of the first item (the value 8)
In XPath, array positions start with 1
Similarly, you can get the price of the second product as
/items/item[2]/product/price
previous
|
start
|
next