# Noob, html trees & parsing

**URL:** <https://www.ruby-forum.com/t/noob-html-trees-parsing/170151>\
**Category:** Ruby\
**Created:** [June 12, 2009, 10:09pm UTC](https://www.ruby-forum.com/t/noob-html-trees-parsing/170151 "2009-06-12T22:09:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [June 12, 2009, 10:09pm UTC](https://www.ruby-forum.com/t/noob-html-trees-parsing/170151/1 "2009-06-12T22:09:58Z")

</div>

Hi all.

Noob, first project, read the Poignant Guide, et al.

I have a big Perl script that parses badly-formed HTML files with HTML  
Element/Tree. I think it’s time for an update.

I think the equivalent in Ruby is Hpricot? I haven’t found a lot of dox  
on this, so I am assuming that this type of problem is something that  
becomes ‘obvious’ once you start working in Ruby. Or should I be  
looking at another/better solution (as in, duh, it’s got XXX built-in,  
noob…)?

TIA

---

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [June 13, 2009, 9:27pm UTC](https://www.ruby-forum.com/t/noob-html-trees-parsing/170151/2 "2009-06-13T21:27:19Z")

</div>

Michael Lesser wrote:

> Hi all.
> 
> Noob, first project, read the Poignant Guide, et al.
> 
> I have a big Perl script that parses badly-formed HTML files with HTML  
> Element/Tree. I think it’s time for an update.
> 
> I think the equivalent in Ruby is Hpricot? I haven’t found a lot of dox  
> on this, so I am assuming that this type of problem is something that  
> becomes ‘obvious’ once you start working in Ruby. Or should I be  
> looking at another/better solution (as in, duh, it’s got XXX built-in,  
> noob…)?
> 
> TIA

You might want to take a look at html5lib \<  
[html5lib · GitHub](http://code.google.com/p/html5lib/) \> for parsing bad markup.
