Class Nokogiri::HTML::SAX::Parser
In: lib/nokogiri/ffi/html/sax/parser.rb
lib/nokogiri/html/sax/parser.rb
ext/nokogiri/html_sax_parser.c
Parent: XML::SAX::Parser

This class lets you perform SAX style parsing on HTML with HTML error correction.

Here is a basic usage example:

  class MyDoc < Nokogiri::XML::SAX::Document
    def start_element name, attributes = []
      puts "found a #{name}"
    end
  end

  parser = Nokogiri::HTML::SAX::Parser.new(MyDoc.new)
  parser.parse(File.read(ARGV[0], 'rb'))

For more information on SAX parsers, see Nokogiri::XML::SAX

Methods

Public Instance methods

Parse data with encoding

Parse data with encoding

Parse html stored in data using encoding

[Validate]