There isn't much to add to Nokogiri's "Parsing an HTML/XML Document" tutorial, which is an easy introduction to the subject, so start there, then return to this page to help fill in some gaps.
Nokogiri's basic parsing attempts to clean up a malformed document, sometimes adding missing clo...