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
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.
30 31 32 |
# File 'lib/nokogiri/html.rb', line 30 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
24 25 26 |
# File 'lib/nokogiri/html.rb', line 24 def parse thing, url = nil, encoding = nil, = XML::ParseOptions::DEFAULT_HTML, &block Document.parse(thing, url, encoding, , &block) end |