XPath - Example of retrieving the text in the second child tag.
ArborX


Summary
This is an example of using XPath to retrieve the text in the second child tag.

The following example illustrates how to use XPath to retrieve the text in the second child tag of the following mark-up:

<authors> <firstname>Bob</firstname> <surname>Harris</surname> <firstname>Fred</firstname> <surname>Mitchell</surname> </authors>

 <?xpath string(/authors/surname[2])>

The above syntax retrieves the text in the second child element. In this case the text that is returned are the surnames of the authors.


Document created on 02-Apr-2003 (revision 001)