class Hatemile::Util::Html::HTMLDOMParser
The HTMLDOMParser
interface contains the methods for access a native parser.
@abstract
Public Instance Methods
Clear the memory of this object.
@abstract @return [void]
# File lib/hatemile/util/html/html_dom_parser.rb, line 144 def clear_parser # Interface method end
Create a element.
@abstract @param tag [String] The tag of element. @return [Hatemile::Util::Html::HTMLDOMElement] The element created.
# File lib/hatemile/util/html/html_dom_parser.rb, line 117 def create_element(tag) # Interface method end
Find all elements in the parser by selector.
@abstract @param selector [String, Hatemile::Util::Html::HTMLDOMElement] The
selector.
@return [Hatemile::Util::Html::HTMLDOMParser] The parser with the
elements found.
# File lib/hatemile/util/html/html_dom_parser.rb, line 38 def find(selector) # Interface method end
Find all elements in the parser by selector, ancestors of found elements.
@abstract @param selector [String, Hatemile::Util::Html::HTMLDOMElement] The
selector.
@return [Hatemile::Util::Html::HTMLDOMParser] The parser with the
elements found.
# File lib/hatemile/util/html/html_dom_parser.rb, line 77 def find_ancestors(selector) # Interface method end
Find all elements in the parser by selector, children of found elements.
@abstract @param selector [String, Hatemile::Util::Html::HTMLDOMElement] The
selector.
@return [Hatemile::Util::Html::HTMLDOMParser] The parser with the
elements found.
# File lib/hatemile/util/html/html_dom_parser.rb, line 51 def find_children(selector) # Interface method end
Find all elements in the parser by selector, descendants of found elements.
@abstract @param selector [String, Hatemile::Util::Html::HTMLDOMElement] The
selector.
@return [Hatemile::Util::Html::HTMLDOMParser] The parser with the
elements found.
# File lib/hatemile/util/html/html_dom_parser.rb, line 64 def find_descendants(selector) # Interface method end
Returns the first element found.
@abstract @return [Hatemile::Util::Html::HTMLDOMElement] The first element found
or null if not have elements found.
# File lib/hatemile/util/html/html_dom_parser.rb, line 87 def first_result # Interface method end
Returns the HTML code of parser.
@abstract @return [String] The HTML code of parser.
# File lib/hatemile/util/html/html_dom_parser.rb, line 126 def get_html # Interface method end
Returns the parser.
@abstract @return [Object] The parser or root element of the parser.
# File lib/hatemile/util/html/html_dom_parser.rb, line 135 def get_parser # Interface method end
Returns the last element found.
@abstract @return [Hatemile::Util::Html::HTMLDOMElement] The last element found
or null if not have elements found.
# File lib/hatemile/util/html/html_dom_parser.rb, line 97 def last_result # Interface method end
Returns a list with all elements found.
@abstract @return [Array<Hatemile::Util::Html::HTMLDOMElement>] The list with
all elements found.
# File lib/hatemile/util/html/html_dom_parser.rb, line 107 def list_results # Interface method end