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/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/html/element_description_defaults.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, encoding = nil) ⇒ Object

Parse a fragment from string in to a NodeSet.



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

def fragment string, encoding = nil
  HTML::DocumentFragment.parse string, encoding
end

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

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



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

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