class Nokogiri::HTML::SAX::PushParser

Public Class Methods

new(doc = XML::SAX::Document.new, file_name = nil, encoding = 'UTF-8') click to toggle source
# File lib/nokogiri/html/sax/push_parser.rb, line 5
def initialize(doc = XML::SAX::Document.new, file_name = nil, encoding = 'UTF-8')
  @document = doc
  @encoding = encoding
  @sax_parser = HTML::SAX::Parser.new(doc, @encoding)

  ## Create our push parser context
  initialize_native(@sax_parser, file_name, @encoding)
end