> The html in the attached file renders 'correctly' in the 3 browsers I
> have tried but it tricks hpricot because of the second malformed
> comment. When I say correctly I mean I get to see 'Some text'. I guess
> it could be argued that this is incorrect. 

What are you trying to do? Matching that comment? Or matching the text
'Some text'? Which version of Hpricot do you use (svn head or 0.4)? What
exactly is the problem?

> For my application it would be nice if hpricot behaved like a browser.
Well, if this is the goal, then use a browser :-). Hpricot is not a
browser and it does not try to be one.

I am working on a project with Java where we are using Mozilla/FireFox
XULRunner to parse the HTML (and to communicate with FF) and it's
really, really robust and fast and reliable and and and. However, AFAIK
this is not doable in Ruby ATM (I would be really happy if it would be,
but from what I have seen it's not - there was some initial try to
implement rbXPCOM, but it was abandoned in 2001). Maybe some other
browser (safari, opera?)

Btw. which feature of 'browser-like'-ness would you like to use? What
are your exact requirements?

Peter

__
http://www.rubyrailways.com