Skip to content

Instantly share code, notes, and snippets.

@neanias
Created March 4, 2015 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neanias/a700f5f79f35c82c6d8c to your computer and use it in GitHub Desktop.
Save neanias/a700f5f79f35c82c6d8c to your computer and use it in GitHub Desktop.
Answers to XPath queries
/ > cat //address
-------
<address>27 Marshall Street, Edinburgh, EH8 9BJ</address>
-------
<address>26 Potterow, Edinburgh, EH8 9BT</address>
-------
<address>7 Nicolson Square, Edinburgh, EH8 9BH</address>
-------
<address>55 West Nicolson Street, Edinburgh, EH8 9DB</address>
-------
<address>12 Chapel Street, Edinburgh, EH8 9AY</address>
-------
<address>6 Chapel Street, Edinburgh, EH8 9AY</address>
-------
<address>2 St Patrick's Square, Edinburgh, EH8 9EZ</address>
-------
<address>14A Nicholson Street</address>
-------
<address>64 South Bridge</address>
-------
<address>16 Nicolson Street, Old Town, Edinburgh, EH8 9DH</address>
/ > cat //@name
-------
name="The Olive Tree"
-------
name="Nawroz"
-------
name="Kebab Mahal"
-------
name="Sylvesters"
-------
name="Buffalo Grill"
-------
name="Nile Valley"
-------
name="Kalpna"
-------
name="Suruchi"
-------
name="Ciao Roma"
-------
name="Ti Amo"
/ > cat //*[@name="Kalpna"]/address
-------
<address>2 St Patrick's Square, Edinburgh, EH8 9EZ</address>
/ > cat //*[cuisine="Indian"]/phoneno/text()
-------
0131 622 7228
-------
0131 667 9890
-------
0131 556 6583
/ > cat //*[cuisine="Italian"]/@name
-------
name="Ciao Roma"
-------
name="Ti Amo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment