I have some HTML:
<hr noshade>
<p><a href="#1">Some text here</a></p>
<p style="margin-top:0pt;margin-bottom:0pt;line-height:120%;"><span style="color:#000000;font-weight:bold;">This is some description</span></p>
<hr noshade> <!-- so <hr noshade> is the delimiter for me -->
<p><a href="#2">Some more text here</a></p>
<p style="margin-top:0pt;margin-bottom:0pt;line-height:120%;"><span style="color:#000000;font-weight:bold;">This is description for some more text</span></p>
<hr noshade>
While parsing using nokogiri, I want to print information between each of these set of tags that are separated by my own delimiter <hr noshade>
. So, the first block should print information between all "p" tags that lie between two hr noshade
tags and so on.
's that it might generate. – Rohan Dalvi Sep 24 '13 at 18:00
` first, and then generate as many XPath queries you need – paul trmbrth Sep 24 '13 at 18:22
" tag? – Rohan Dalvi Sep 24 '13 at 19:06
` – paul trmbrth Sep 24 '13 at 19:46