i need figuring out xpath
expressions locate specific information xml excerpt.
<?xml version="1.0"?> <!doctype example example "example.dtd"> <example mode="server"> <listen> <address>9.21.1.33</address> <address>9.4.43.207</address> <port proto="tcp">9786</port> </listen> <max-clients>16</max-clients> <turn-clock unit="seconds">40</turn-clock> </example>
then trying figure out following:
- the set of address elements
- the value of unit attribute of turn-clock element
- the mode attribute of root element
- the value of second example element
- the value of max-clients element
//address
//turn-clock/@unit
//@mode
//turn-clock/text()
//max-clients/text()