struct Myhtml::Parser

Defined in:

myhtml/parser.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(page : String, encoding : Lib::MyEncodingList | Nil = nil, detect_encoding_from_meta : Bool = false, detect_encoding : Bool = false, tree_options : Lib::MyhtmlTreeParseFlags | Nil = nil) #

[View source]
def self.new(io : IO, tree_options : Lib::MyhtmlTreeParseFlags | Nil = nil, encoding : Lib::MyEncodingList | Nil = nil) #

[View source]

Instance Method Detail

def body(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def body(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def body!(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def body!(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def css(*args, **options) #

Css selectors, see Node#css


[View source]
def css(*args, **options, &) #

Css selectors, see Node#css


[View source]
def document!(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def document!(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def encoding(*args, **options) #

Current encoding


[View source]
def encoding(*args, **options, &) #

Current encoding


[View source]
def free(*args, **options) #

Manually free object, dangerous (also called by GC finalize)


[View source]
def free(*args, **options, &) #

Manually free object, dangerous (also called by GC finalize)


[View source]
def head(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def head(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def head!(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def head!(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def html(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def html(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def html!(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def html!(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def nodes(*args, **options) #

Top level node filter (select all nodes in tree with tag_sym) returns Myhtml::Iterator::Collection equal with myhtml.root!.scope.nodes(...)

myhtml.nodes(:div).each { |node| ... }


[View source]
def nodes(*args, **options, &) #

Top level node filter (select all nodes in tree with tag_sym) returns Myhtml::Iterator::Collection equal with myhtml.root!.scope.nodes(...)

myhtml.nodes(:div).each { |node| ... }


[View source]
def root(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def root(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def root!(*args, **options) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def root!(*args, **options, &) #

Root nodes for parsed tree myhtml.body! - body node myhtml.head! - head node myhtml.root! - html node myhtml.document! - document node


[View source]
def to_html(*args, **options) #

Convert html tree to html string, see Node#to_html


[View source]
def to_html(*args, **options, &) #

Convert html tree to html string, see Node#to_html


[View source]
def to_pretty_html(*args, **options) #

[View source]
def to_pretty_html(*args, **options, &) #

[View source]