Class | Nokogiri::HTML::SAX::Parser
In: | lib/nokogiri/html/sax/parser.rb
Parent: | Nokogiri::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

parse_file parse_memory

### Public Instance methods

parse_file(filename, encoding = 'UTF-8') {|ctx if block_given?| ...}

Parse a file with `filename`

parse_memory(data, encoding = 'UTF-8') {|ctx if block_given?| ...}

Parse html stored in `data` using `encoding`

[Validate]