HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

nokogiri — An HTML, XML, SAX, and Reader parser. More information: <https://manned.org/nokogiri>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
htmlcommandandclinokogirisaxxmlreader

Problem

How to use the nokogiri command: An HTML, XML, SAX, and Reader parser. More information: <https://manned.org/nokogiri>.

Solution

nokogiri — An HTML, XML, SAX, and Reader parser. More information: <https://manned.org/nokogiri>.

Parse the contents of a URL or file:
nokogiri {{url|path/to/file}}


Parse as a specific type:
nokogiri {{url|path/to/file}} --type {{xml|html}}


Load a specific initialization file before parsing:
nokogiri {{url|path/to/file}} -C {{path/to/config_file}}


Parse using a specific encoding:
nokogiri {{url|path/to/file}} {{[-E|--encoding]}} {{encoding}}


Validate using a RELAX NG file:
nokogiri {{url|path/to/file}} --rng {{url|path/to/file}}

Code Snippets

Parse the contents of a URL or file

nokogiri {{url|path/to/file}}

Parse as a specific type

nokogiri {{url|path/to/file}} --type {{xml|html}}

Load a specific initialization file before parsing

nokogiri {{url|path/to/file}} -C {{path/to/config_file}}

Parse using a specific encoding

nokogiri {{url|path/to/file}} {{[-E|--encoding]}} {{encoding}}

Validate using a RELAX NG file

nokogiri {{url|path/to/file}} --rng {{url|path/to/file}}

Context

tldr-pages: common/nokogiri

Revisions (0)

No revisions yet.