Skip to content

Commit

Permalink
Merge branch 'master' of github.com:CodersOfTheNight/web-grazer
Browse files Browse the repository at this point in the history
  • Loading branch information
Šarūnas Navickas committed Sep 25, 2016
2 parents cbb3e7f + 34947d6 commit 276fc7a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,18 @@ General syntax looks like:
Each "/" symbolizes new child matching, part inside "[<...>]" is optional, it
can be skipped if you have no intention to query inside these tags
, eg.: if you want to get *all* links in the page.

For selecting concrete element from matches array, use "{#n}" syntax, eg.
if we have :

.. code-block:: html

<div class="menu">
<a href=#1>Link1</a>
<a href=#2>Link2</a>
<a href=#3>Link3</a>
</div>

following query can be used to retrieve "Link2":
div[class="menu"]/a{1}
where "a{1}" indicates that we want to retrieve all links, and get 2nd link from that array

0 comments on commit 276fc7a

Please sign in to comment.