From: niklas | brueckenschlaeger Date: 2010-11-15T18:11:01+09:00 Subject: Re: Nokogiri not read html file in Cent OS 32-bit --=-DHjO0+mDlaOntWhMU8mq Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Can't reproduce your problem. Try this: require 'rubygems' require 'nokogiri' # make sure the file contains sth. File.open('test.html', 'w') {|f| f.write("

Foo

") } f =3D File.open('test.html') data =3D Nokogiri::HTML(f) puts data p data ----- OUTPUT ------

Foo

#, #]>]>]>]> On Mon, 2010-11-15 at 17:56 +0900, Priyank Shah wrote: > Florian Gilcher wrote in post #961470: > > What Ryan is telling you: you have to pass a filepointer or the actual > > HTML as string, not a string containing a filename. >=20 >=20 > hi, >=20 > Thanks for explain but still i get the same problem >=20 > i us following in cent Os-5.5 32 bit >=20 > $> nokogiri -v >=20 > Ruby >=20 > engine:mri > version:1.8.7 > platform:i686-linux >=20 > libxml: >=20 > loaded: 2.6.26 > binding: extension > complied:2.6.26 > nokogiri:1.4.3.1 >=20 >=20 > -------- > my code is like >=20 > f =3D File.open("test.html") > data =3D Nokogiri::HTML(f) > puts "#{data}" >=20 > p "#{data}" >=20 > but any of this give >=20 > Output: >=20 > "=20 > this type of output it shows not get actual html contents. >=20 > So help me if you have any more idea. >=20 > Thanks, > Priyank Shah >=20 --=-DHjO0+mDlaOntWhMU8mq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJM4PkfAAoJEIQdQGZOjo82g6EP/1BZIiPZI7z+D00JiCaK+wIZ x0Xb7UcY8E7xWG3KQ5SaIte9bg6rLrQXDzFuEi8npxoJkaMBxydRTyeaFsLuwca9 yY2o8puGgqTlS72sikp/7aCmWpi+lzXETnCKTOoRliPuDDe9emqsy+YasbN/NzoK bqvT5EKd15ZCw10LrCBAitjB/YG0aP6OupzIMaDTExMCIfrRDJ4DmVQTI7k5+xvA NWIr+dmQoxYNHVZoUKwsguOYU7Pkps3+6t/3hyrikGPhFUeMEo21gIzjkD9Qdw+l 0D1qMkK+Kcmxd+I5m4N0tsrT25hZum7JOtixy5WGHO7qnSWQNa8Zhn+RHQd7SZYX FONszxLKU0g6knZBBesG2m5LYFKsrLsfR8khbMoiB9Aso5AxGce6Lj+1MQEvSYQn YnJ2FOU3mvQ7irng+imnuxguN0ZAUJ7c4FZteKWv++/OyW2TZuHjAzq+8TUXsCbP Ny7HI20+t6Ezp26Cx2vyZTbrZf/I2SA0VzqPz5X8i2z3fsXv8MXbY4kA57gTWvk6 rQbVIjzSJO8MMeHOs7TjoglEct5NkyPReUnv5yxSKrDWyMSJ2w4Dv9gBHZ/8knTU H8dff3mWpVIQtHe23AosBY8WPKww8dHCtJwW8kfFho+m1pLVv8QfHNY4WKLfTwxh 2SEOgQpgElayIZtIUVAQ =U0Aw -----END PGP SIGNATURE----- --=-DHjO0+mDlaOntWhMU8mq--