I have an html
 <h3> <span class="mw-headline">Central Kolkata</span></h3><li> <b>Eden
Gardens</b> (one of the most famous cricket stadiums in the world),
</li><li> <b>Akashwani Bhavan</b>, All India Radio building
</li><li> <b>Indoor Stadium</b>
</li><li> <b>Fort William</b>, the massive and impregnable British Citadel
built in 1773. The fort is still in use and retains its well-guarded
grandeur. Visitors are allowed in with special permission only.
</li><li> <b>Victoria Memorial</b> <a href="
http://www.victoriamemorial-cal.org"; class="external autonumber" title="
http://www.victoriamemorial-cal.org";>[10]</a> Along St. George’s Gate Road,
on the southern fringe of the Maidan, you will find Kolkata's most famous
landmark , a splendid white marble monument (CLOSED MONDAYS).
</li><li> <b>Calcutta Racecourse</b>
</li><li> <b>Chowringee</b>, is the Market place of Kolkata. You will find
shops ranging from Computer Periferals to cloth merchants. Even tailors and
a few famous Movie theaters too. This place is a favourite pass time for
local people.
</li><h3> <span class="mw-headline">Northern Kolkata</span></h3><li>
<b>Nakhoda Mosque1</b> (the largest mosque in Kolkata) and the
</li><li> <b>Shobhabajar Rajbari</b> the ancestral house of Rja Naba
Krishna, one of the rich locals to side with Clive during his war with Nabab
Siraj-Ud-Daula.
</li><li> <b>Jorasanko Thakur Bari1</b> (Tagore Family residence).
</li><li> <b>Parashnath Jain Temple</b>, near the Belgachia metro station.
</li><li> <b>Parashnath Jain Temple</b>, at Gouribari, less visited,
reachable from the Sovabazar Metro station (take an auto rickshaw).
</li>

if wanna search innert_text of <li> tags upto  <span
class="mw-headline">Northern Kolkata</span>

but it searches all <li>

my code is

 doc.search("li").each do |y|

it searches all <li> i know but i wanna stop upto <span> element using
hpricot


Regards
Prashant



On Tue, Sep 8, 2009 at 10:49 AM, g_f <[email protected]> wrote:

>
> What have you written so far and why do you think it didn't work?
>
> On Sep 7, 8:43 pm, prashanth hiremath <[email protected]>
> wrote:
> > I have an html like
> >
> > <see><span>Red<</span><li>...</li><li></li>...
> > <span>blue</span><li>...</li><li></li>
> >
> > I have to write code in such way that i wanna search  <li></li> text
> until
> >
> > between 2 span Ex:<span> </span> <li> </li>  ...<li></li> <span></span>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to