123456789_123456789_123456789_123456789_123456789_

Class: Nokogiri::HTML4::SAX::ParserContext

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Nokogiri::XML::SAX::ParserContext
Defined in: lib/nokogiri/html4/sax/parser_context.rb,
ext/nokogiri/html4_sax_parser_context.c,
ext/nokogiri/xml_sax_parser_context.c

Overview

Context for ::Nokogiri::HTML SAX parsers. This class is usually not instantiated by the user. Instead, you should be looking at Parser

Class Method Summary

::Nokogiri::XML::SAX::ParserContext - Inherited

.file

Parse file given filename

.io

Parse io object with encoding

.memory

Parse the ::Nokogiri::XML stored in memory in data

.new

Instance Attribute Summary

::Nokogiri::XML::SAX::ParserContext - Inherited

#recovery

Should this parser recover from structural errors? It will not stop processing file on structural errors if set to true.

#recovery=

Should this parser recover from structural errors? It will not stop processing file on structural errors if set to true.

#replace_entities
#replace_entities=

Instance Method Summary

::Nokogiri::XML::SAX::ParserContext - Inherited

#column

Get the current column the parser context is processing.

#line

Get the current line the parser context is processing.

#parse_with

Use sax_handler and parse the current document.

Constructor Details

.new(thing, encoding = "UTF-8") ⇒ ParserContext

[ GitHub ]

  
# File 'lib/nokogiri/html4/sax/parser_context.rb', line 10

def self.new(thing, encoding = "UTF-8")
  if [:read, :close].all? { |x| thing.respond_to?(x) }
    super
  else
    memory(thing, encoding)
  end
end

Class Method Details

.file(filename)

.memory(data)

Instance Method Details

#parse_with(sax_handler)