nokogiri
an HTML, XML, SAX, and Reader parser
TLDR
Parse the contents of a URL or file
Parse as a specific type
Load a specific initialization file before parsing
Parse using a specific encoding
Validate using a RELAX NG file
DESCRIPTION
Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri’s many features is the ability to search documents via XPath or CSS3 selectors. The nokogiri command parses a document, and launches an interactive ruby session (irb(1)), allowing one to analysing the result interactively.
SYNOPSYS
okogiri
OPTIONS
--type [TYPE]
Set the type of the document to be parsed
-E, --encoding encoding
Set the encoding of the document
-e command
Specifies script from command-line
--rng
EXAMPLES
okogiri http://www.ruby-lang.org/ nokogiri ./public/index.html curl -s http://nokogiri.org | nokogiri -e'p $_.css("h1").length' 2019-08-03 NOKOGIRI(1)