Module: Nokogiri::HTML4

Defined in:
lib/nokogiri/html4.rb,
lib/nokogiri/html4/builder.rb,
lib/nokogiri/html4/document.rb,
lib/nokogiri/html4/sax/parser.rb,
lib/nokogiri/html4/entity_lookup.rb,
lib/nokogiri/html4/sax/push_parser.rb,
lib/nokogiri/html4/document_fragment.rb,
lib/nokogiri/html4/sax/parser_context.rb,
lib/nokogiri/html4/element_description.rb,
lib/nokogiri/html4/element_description_defaults.rb,
ext/nokogiri/nokogiri.c

Overview

Note:

Before v1.12.0, HTML4 did not exist, and HTML was the module/namespace for parsing HTML.

Since:

  • v1.12.0

Defined Under Namespace

Modules: SAX Classes: Builder, Document, DocumentFragment, ElementDescription, EntityDescription, EntityLookup

Constant Summary collapse

NamedCharacters =

Instance of Nokogiri::HTML4::EntityLookup

Since:

  • v1.12.0

EntityLookup.new

Class Method Summary collapse

Class Method Details

.fragment(string, encoding = nil) ⇒ Object

Parse a fragment from string in to a NodeSet.

Since:

  • v1.12.0


23
24
25
# File 'lib/nokogiri/html4.rb', line 23

def fragment(string, encoding = nil)
  HTML4::DocumentFragment.parse(string, encoding)
end

.parse(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block) ⇒ Object

Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse

Since:

  • v1.12.0


17
18
19
# File 'lib/nokogiri/html4.rb', line 17

def parse(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
  Document.parse(input, url, encoding, options, &block)
end