XPath (XML Path Language) is a query language in which we can select nodes and nodes values from an XML, It also can be used for some string value or Boolean values.
In a simple way XPath is a simple address of an item in XML, Almost all browsers supports XPaths as XHTML doc. It is basically based on a tree representation to navigating and search nodes in the DOM.
Xpath Eg:
<?xml version="1.0" encoding="utf-8"?>
<xmltag>
<projects>
<project name="New Project" launch="2015-01-08">
<editions>
<edition language="English">Xpath test</edition>
</editions>
</project>
</projects>
</xmltag>
How to use expressions :
/xmltag/projects/project/@name (Selects name attributes for all projects)
/xmltag/projects/project/editions (Selects all editions of project) Etc…
For XHTML or HTML XPath please refer XPath for HTML Elements a good explanation of XPath creation and use.