If you put in the view then you may need to strip of the html tags.

Try the following in the console.

require 'open-uri'
require 'nokogiri'

doc = Nokogiri::HTML(open("http://www.tamil.net";).read)
                                      puts doc.inner_html

 If you want to place it in the view, then try "doc.inner_text"
to strip of the html tags.








On 11 June 2010 15:14, Vuong Hung <[email protected]> wrote:

> Vuong Hung wrote:
> > Bala wrote:
> >> try hpricot it'll be usefull
>  Thanks, Bala.
>  I try using 'hpricot' but I can get a little data on website, not all.
>  I think some data to view by Ajax or JavaScript. Can you tell me other
>  idea?
>
> Code to this:
> Controller:
>  @doc = Hpricot(open("http://priceonline.hsc.com.vn";))
>
> And View: I show all anything of "@doc"
>  <%=doc%>
> But not find data, only some data of layout.
>
> Help me. Thanks.
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
-- 
Nandri(Thanks in Tamil),
Amala Singh

-- 
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