Module: Nokogiri::HTML

Defined in:
lib/nokogiri/html.rb,
lib/nokogiri/html/builder.rb,
lib/nokogiri/html/document.rb,
lib/nokogiri/html/sax/parser.rb,
lib/nokogiri/ffi/html/document.rb,
lib/nokogiri/html/entity_lookup.rb,
lib/nokogiri/ffi/html/entity_lookup.rb,
lib/nokogiri/html/document_fragment.rb,
lib/nokogiri/html/sax/parser_context.rb,
lib/nokogiri/html/element_description.rb,
lib/nokogiri/ffi/html/sax/parser_context.rb,
lib/nokogiri/ffi/html/element_description.rb,
ext/nokogiri/nokogiri.c,
ext/nokogiri/html_document.c,
ext/nokogiri/html_entity_lookup.c,
ext/nokogiri/html_sax_parser_context.c,
ext/nokogiri/html_element_description.c

Defined Under Namespace

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

Constant Summary collapse

NamedCharacters =

Instance of Nokogiri::HTML::EntityLookup

EntityLookup.new

Class Method Summary collapse

Class Method Details

.fragment(string) ⇒ Object

Parse a fragment from string in to a NodeSet.



27
28
29
# File 'lib/nokogiri/html.rb', line 27

def fragment string
  HTML::DocumentFragment.parse(string)
end

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

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



21
22
23
# File 'lib/nokogiri/html.rb', line 21

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