Absolute and Relative XPath Expressions
In this tutorial, we will learn about Absolute and Relative XPath Expressions. These are the mechanisms to identify the element in the document.
XPath is a query language to identify elements in the documents. Types of XPath expressions are:
- Absolute XPath Expression
- Relative XPath Expression
An absolute XPath is the complete path from the root node of the document. The absolute path starts with ‘/’
The relative XPath starts with the ‘//’ and search for the element relative from the current node.