## XPath

XPath is used to navigate through elements and attributes in an XML document.

Since HTML is basically an XML document, XPath can be useful in developing an automation test, web crawler, and perhaps an advanced XML parsing application.

Example of XPath syntax:

//input[@type="hidden"]
this syntax will return all inputs of which type are "hidden"

//input[@type="hidden"][@name="input_name"]
this syntax will return all inputs of which type are "hidden" and have the name "input_name"

//tr[contains(.,"some texts")]/td[1][contains(.,"more detailed text")]
this syntax will return the first which contains "more detailed text" and this is the child of which contains "some texts" in any of its elements or attributes.