struct Arachnid::Document::HTML
- Arachnid::Document::HTML
- Struct
- Value
- Object
Defined in:
arachnid/document/html.crConstructors
Class Method Summary
-
.css_query_to_xpath(query : String) : String
Transform the css query into an xpath query
- .parse(content : String)
Instance Method Summary
-
#at_css(query : String)
Find first node corresponding to the css query and return
HTML::Tag
if found ornil
if not found -
#at_id(id_name : String) : Tag?
Find a node by its id and return a
HTML::Tag
found ornil
if not found -
#at_tag(tag_name : String) : Tag?
Find first tag by tag name and return
HTML::Tag
if found ornil
if not found -
#css(query : String, &block) : Array(Tag)
Find all nodes corresponding to the css query and yield
HTML::Tag
found ornil
if not found -
#where_class(class_name : String, &block) : Array(Tag)
Find all nodes by classname and yield
HTML::Tag
founded -
#where_tag(tag_name : String, &block) : Array(Tag)
Find all nodes by tag name and yield
HTML::Tag
if found
Macro Summary
Constructor Detail
Class Method Detail
Instance Method Detail
Find first node corresponding to the css query and return
HTML::Tag
if found or nil
if not found
Find a node by its id and return a
HTML::Tag
found or nil
if not found
Find first tag by tag name and return
HTML::Tag
if found or nil
if not found
Find all nodes corresponding to the css query and yield
HTML::Tag
found or nil
if not found
Find all nodes by classname and yield
HTML::Tag
founded
Find all nodes by tag name and yield
HTML::Tag
if found