JSONXPath::Node
Inherits Reference < Object
A Node consists of a NodeType and some data (tag name for element nodes, content for text)
and are part of a tree of Nodes
Class methods
parse(input : String | IO)
SourceInstance methods
children
Sourcedata
Sourcefirst_child
Sourcefirst_child=(first_child : Node | Nil)
Sourcelast_child
Sourcelast_child=(last_child : Node | Nil)
Sourcelevel
Sourcenext_sibling
Sourcenext_sibling=(next_sibling : Node | Nil)
Sourceparent
Sourceparent=(parent : Node | Nil)
Sourceprev_sibling
Sourceprev_sibling=(prev_sibling : Node | Nil)
Sourceraw
Sourcetype
Sourcexpath(path : String) : Node | Nil
Searches this node for XPath path. Returns first matched HTML::Node or nil
xpath_bool(path : String)
Searches this node for XPath path and restricts the return type to String.
xpath_evaluate(path)
Searches this node for XPath path and return result with appropriate type
(Bool | Float64 | String | NodeIterator | Nil)
xpath_float(path : String)
Searches this node for XPath path and restricts the return type to Float64.
xpath_nodes(path : String) : Array(Node)
Searches this node for XPath path. Returns all of the matched HTML::Node