XPath Expressions

Axes

Axis Example Means
/ //ul/li/a Child
// //[@id="list"]//a Descendant

Prefixes

Prefix Example Means
// //hr[@class='edge'] Anywhere
/ /html/body/div Root
./ ./div/p Relative

Steps and axes

- - - -
// ul / a[@id='link']
Axis Step Axis Step
Comments