Skip to content

Instantly share code, notes, and snippets.

@PietrH
Last active July 4, 2019 10:23
Show Gist options
  • Save PietrH/5195512ae7fcbf4505e80740efd2aad9 to your computer and use it in GitHub Desktop.
Save PietrH/5195512ae7fcbf4505e80740efd2aad9 to your computer and use it in GitHub Desktop.
XPath basic syntax
Expression Description
nodename Selects all nodes with the name "nodename"
/ Selects from the root node
// Selects nodes in the document from the current node that match the selection no matter where they are
. Selects the current node
.. Selects the parent of the current node
@ Selects attributes
[] Condition on a selection
@PietrH
Copy link
Author

PietrH commented Jul 4, 2019

For example

//element[@type='VALUE']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment