nokogiri

an HTML, XML, SAX, and Reader parser

TLDR

Parse the contents of a url or file

>_ nokogiri [url|path/to/file]
copy

Parse as a specific type

>_ nokogiri [url|path/to/file] --type [xml|html]
copy

Load a specific initialisation file before parsing

>_ nokogiri [url|path/to/file] -C [path/to/config_file]
copy

Parse using a specific encoding

>_ nokogiri [url|path/to/file] --encoding [encoding]
copy

Validate using a RELAX NG file

>_ nokogiri [url|path/to/file] --rng [url|path/to/file]
copy

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

nokogiri [options]

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 Validate using this rng file -?, --help Show a message very similar to this man page -v, --version Show the version of the program

EXAMPLES

nokogiri 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)

Copied to clipboard
free 100$ digital ocean credit