class Cristagiri::HTML

Overview

Represent an Html document who can be parsed

Defined in:

cristagiri/html.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_file(path : String) : HTML #

Initialize an Html object from content of file designed by the given filepath


[View source]
def self.from_url(url : String) : HTML #

Initialize an Html object from Html source fetched from the url


[View source]
def self.new(content : String) #

Initialize an Html object from Html source


[View source]

Instance Method Detail

def at_id(id_name : String) #

Find a node by its id and return a XML::Node founded or a nil if not founded


[View source]
def class(classname : String, &) #

Find all nodes by classname and yield XML::Node founded


[View source]
def content : String #

[View source]
def tag(tag : String, &) #

Find all nodes by tag name and yield XML::Node founded


[View source]