Just in case anyone runs into this:  I created my own recursive
function that starts at the end element and checks each previous
element and adds it to an array for a match.
On Sep 20, 5:45 pm, David <dly...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I am attempting to parse a wiktionary entry to retrieve all english
> definitions.  I am able to retrive all definitions, the problem is
> that some definitions are in other languages.  What I would like to do
> is somehow retrieve only the html block with english definitions.  I
> have found that, in the case that there are other language entries,
> the header after the english definitions can be retrieved with: header
> = (doc/"h2")[3].  So I would like to only search all the elements
> before this header element.  I thought that may be possible with
> header.preceding_siblings(), but that does not seem to be working.
> Any suggestions?