Created
November 14, 2017 21:50
-
-
Save Dulani/6e5283cda22842f0d6dd62ce366873e1 to your computer and use it in GitHub Desktop.
Some working Xpath expressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xpath | |
#Starting with what you know you want an xpath expression for, pick it out and then pick its parent out. | |
//*[Name="Q1"] | |
//*[Name="Q1"]/parent::* | |
//Grid[Name="Q1"]/parent::* | |
#All the text attributes of the name elements of the grid nodes: | |
//Grid/Name/text() | |
#All of the grid nodes: | |
//Grid/* | |
#The text elements: | |
//Grid/FormTexts/FormText/Text/text() | |
#Contents of the relevant Name and Text elements under the grid node. | |
//Grid/Name/text()|//Grid/FormTexts/FormText/Text/text() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment