I want to get file contents from html file
after getting i want to display it in the view page.any sample
any helps
Thanks
I want to get file contents from html file
after getting i want to display it in the view page.any sample
any helps
Thanks
Newb N. wrote:
I want to get file contents from html file
after getting i want to display it in the view page.any sampleany helps
Thanks
Hi,
As you want html parsing in rails. there are several gems available
for it. one of them is “hpricot”.
for more information refer this
Fast HTML parsing in Ruby with Hpricot.
Hope, this will help you.
Thanks,
Priyanka P.
Priyanka P. wrote:
Newb N. wrote:
I want to get file contents from html file
after getting i want to display it in the view page.any sampleany helps
ThanksHi,
As you want html parsing in rails. there are several gems available
for it. one of them is “hpricot”.
for more information refer this
Fast HTML parsing in Ruby with Hpricot.
Hope, this will help you.Thanks,
Priyanka P.
hi…
@doc = Hpricot.parse(“#{@file_path}”)
i tried like above…can i get all the contents of the file in this @doc
instance variable
can u pls provide me an example
hi…
@doc = Hpricot.parse("#{@file_path}")
i tried like above…can i get all the contents of the file in this @doc
instance variable
can u pls provide me an example
@file_path = d:/temp/History/regst.html
Priyanka P. wrote:
Newb N. wrote:
I want to get file contents from html file
after getting i want to display it in the view page.any sampleany helps
ThanksHi,
As you want html parsing in rails. there are several gems available
for it. one of them is “hpricot”.
for more information refer this
Fast HTML parsing in Ruby with Hpricot.
Hope, this will help you.
Nokogiri is supposed to be faster than Hpricot, for what that’s worth.
Thanks,
Priyanka P.
Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
hi…’
actually i read html file
@content = File.read ("#file_path}")
i dispaly in my view like <%=@content%>
this causes style issues in my page …
why waht is the problem…
pls help me…,.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs