[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

uninitialized constant HTMLTree (NameError

Vikash Kumar

11/4/2006 12:21:00 PM

I am working on windows environment, in my code I am using,

require 'http-access2'

client = HTTPAccess2::Client.new
url="http://www.elliottbaybook.com...
parser = HTMLTree::XMLParser.new(false,false)
parser.feed(client.getContent(url))
xml=parser.document



When I run the code it gives the following error message:

uninitialized constant HTMLTree (NameError)




--
Posted via http://www.ruby-....

2 Answers

Gavin Kistner

11/4/2006 3:05:00 PM

0

Vikash Kumar wrote:
> I am working on windows environment, in my code I am using,
>
> require 'http-access2'
>
> uninitialized constant HTMLTree (NameError)

You need to require the library with HTMLTree in it.

require 'html/tree'

Vikash Kumar

11/6/2006 11:11:00 AM

0

Vikash Kumar wrote:
> I am working on windows environment, in my code I am using,
>
> require 'http-access2'
>
> client = HTTPAccess2::Client.new
> url="http://www.elliottbaybook.com...
> parser = HTMLTree::XMLParser.new(false,false)
> parser.feed(client.getContent(url))
> xml=parser.document
>
>
>
> When I run the code it gives the following error message:
>
> uninitialized constant HTMLTree (NameError)



The above error is resolved by adding require 'html/tree', but a new
error is coming

uninitialized constant HTMLTree::XMLParser (NameError)

--
Posted via http://www.ruby-....