1) XPath is a technology used in XML. It is used to retrieve elements from XML documents. XPath expressions can be used to locate and retrieve elements, attributes and values from XML files because XML documents are structured. It is similar to SQL.
2) As SQL is used to retrieve data from database, XPath is used to retrieve data from XML.