Module: Oga
- Defined in:
- lib/oga/css/lexer.rb,
lib/oga/lru.rb,
lib/oga/oga.rb,
lib/oga/version.rb,
lib/oga/xml/node.rb,
lib/oga/xml/text.rb,
lib/oga/blacklist.rb,
lib/oga/whitelist.rb,
lib/oga/xml/cdata.rb,
lib/oga/xml/lexer.rb,
lib/oga/css/parser.rb,
lib/oga/xml/parser.rb,
lib/oga/html/parser.rb,
lib/oga/xml/comment.rb,
lib/oga/xml/doctype.rb,
lib/oga/xml/element.rb,
lib/oga/xpath/lexer.rb,
lib/oga/xml/document.rb,
lib/oga/xml/entities.rb,
lib/oga/xml/node_set.rb,
lib/oga/xml/querying.rb,
lib/oga/xpath/parser.rb,
lib/oga/html/entities.rb,
lib/oga/xml/attribute.rb,
lib/oga/xml/namespace.rb,
lib/oga/xml/traversal.rb,
lib/oga/entity_decoder.rb,
lib/oga/xml/sax_parser.rb,
lib/oga/html/sax_parser.rb,
lib/oga/xml/pull_parser.rb,
lib/oga/xpath/evaluator.rb,
lib/oga/xml/character_node.rb,
lib/oga/xml/xml_declaration.rb,
lib/oga/xml/default_namespace.rb,
lib/oga/xml/html_void_elements.rb,
lib/oga/xml/processing_instruction.rb
Overview
line 3 "lib/oga/xpath/lexer.rl"
Defined Under Namespace
Modules: CSS, EntityDecoder, HTML, XML, XPath Classes: Blacklist, LRU, Whitelist
Constant Summary collapse
- VERSION =
'1.0.3'
Class Method Summary collapse
-
.parse_html(html, options = {}) ⇒ Oga::XML::Document
Parses the given HTML document.
-
.parse_xml(xml, options = {}) ⇒ Oga::XML::Document
Parses the given XML document.
-
.sax_parse_html(handler, html, options = {}) ⇒ Object
Parses the given HTML document using the SAX parser.
-
.sax_parse_xml(handler, xml, options = {}) ⇒ Object
Parses the given XML document using the SAX parser.
Class Method Details
.parse_html(html, options = {}) ⇒ Oga::XML::Document
Parses the given HTML document.
26 27 28 |
# File 'lib/oga/oga.rb', line 26 def self.parse_html(html, = {}) HTML::Parser.new(html, ).parse end |
.parse_xml(xml, options = {}) ⇒ Oga::XML::Document
Parses the given XML document.
12 13 14 |
# File 'lib/oga/oga.rb', line 12 def self.parse_xml(xml, = {}) XML::Parser.new(xml, ).parse end |