module Nokogiri
def HTML thing, url = nil, encoding = nil, options = 2145
Nokogiri::XML::PARSE_RECOVER. See the constants in
is a number that sets options in the parser, such as
encoding that should be used when processing the document. +options+
+url+ is resource where this document is located. +encoding+ is the
responds to _read_ and _close_ such as an IO, or StringIO.
Parse HTML. +thing+ may be a String, or any object that
##
def HTML thing, url = nil, encoding = nil, options = 2145 Nokogiri::HTML.parse(thing, url, encoding, options) end
def Hpricot(*args, &block)
def Hpricot(*args, &block) if block_given? builder = Nokogiri::HTML::Builder.new(&block) Nokogiri::Hpricot.add_decorators(builder.doc) else doc = Nokogiri.parse(*args) Nokogiri::Hpricot.add_decorators(doc) end end
def Slop(*args, &block)
assert_equal('second', doc.html.body.p[1].text)
eohtml