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/sax/push_parser.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_push_parser.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
-
.fragment(string, encoding = nil) ⇒ Object
Parse a fragment from
string
in to a NodeSet. -
.parse(thing, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block) ⇒ Object
Parse HTML.
Class Method Details
.fragment(string, encoding = nil) ⇒ Object
Parse a fragment from string
in to a NodeSet.
29 30 31 |
# File 'lib/nokogiri/html.rb', line 29 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
23 24 25 |
# File 'lib/nokogiri/html.rb', line 23 def parse thing, url = nil, encoding = nil, = XML::ParseOptions::DEFAULT_HTML, &block Document.parse(thing, url, encoding, , &block) end |