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
-
.file(filename)
Alias for XML::SAX::ParserContext.file.
-
.memory(data)
Alias for XML::SAX::ParserContext.memory.
- .new(thing, encoding = "UTF-8") ⇒ ParserContext constructor
::Nokogiri::XML::SAX::ParserContext
- Inherited
.file | Parse file given |
.io | Parse |
.memory | Parse the |
.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 | Alias for XML::SAX::PushParser#replace_entities. |
#replace_entities= | Alias for XML::SAX::PushParser#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 |
Constructor Details
.new(thing, encoding = "UTF-8") ⇒ ParserContext
# 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)
Alias for XML::SAX::ParserContext.file.
.memory(data)
Alias for XML::SAX::ParserContext.memory.
Instance Method Details
#parse_with(sax_handler)
Alias for XML::SAX::ParserContext#parse_with.