XPath Relative Path - XPath

What is XPath Relative Path?

Place route specifies the area of node in XML record. This path can be absolute or relative. If area route begins with the node that we have selected then it is a relative path.

Following are few examples locating the elements the use of relative path.

First name − choose firstname related to student nodes.

Example

In this example, we have created a sample XML report students.xml and its stylesheet file students.xsl which makes use of the XPath expressions.

Following is the sample XML used.

students.xml

students.xsl

Verify the output

XPath - Relative Path

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XPath Topics