class Nokogiri::HTML4::SAX::PushParser

def finish

Nokogiri::HTML4::SAX::Document#end_document to be called.
Finish the parsing. This method is only necessary for
##
def finish
  write("", true)
end

def initialize(doc = HTML4::SAX::Document.new, file_name = nil, encoding = "UTF-8")

def initialize(doc = HTML4::SAX::Document.new, file_name = nil, encoding = "UTF-8")
  @document = doc
  @encoding = encoding
  @sax_parser = HTML4::SAX::Parser.new(doc, @encoding)
  ## Create our push parser context
  initialize_native(@sax_parser, file_name, encoding)
end

def write(chunk, last_chunk = false)

that can be called will be called immediately.
Write a +chunk+ of HTML to the PushParser. Any callback methods
##
def write(chunk, last_chunk = false)
  native_write(chunk, last_chunk)
end