Switch from Hpricot to Nokogiri, WIP
use Nokogiri::XML.fragment as to not assume we are parsing a complete document
Always use Nokogiri's HTML parsing. Detect if it is a complete Document via DOCTYPE
use #to_xhtml to determine which tags can be self closing
self closing slash applied only to tags that are self closing in xhtml
remove content from dom that was inserted via "succeed"
remove cdata tokens when filtering javascript
detect cdata in html and use XML fragment parser.
remove haml namespace in erb tags
use next_sibling instead of next_element

since XML::Text is not a type of XML::Element
fix cdata indentation issue
rename strange test, added test for natural use case
escape square brackets in regex
Make doctype regex case insensitive