Nokogiri is a an HTML, SAX, XML, and Reader parser available on multiple open-source operating systems. Nokogiri also allows you to search document with XPath or CSS3 selectors. You can find out how to download it at the link below.
As of Nokogiri 1.6,
libxsltsource code is bundled with Nokogiri, and compiled at gem-install-time. The instructions in this document should work for all versions 1.6.4 and later.
(If you need support for installing earlier versions of Nokogiri, you may want to take a look at the git history for this document.)
Get Nokogiri here: http://www.nokogiri.org/tutorials/installing_nokogiri.html#freebsd