phpman > man > NOKOGIRI(1)

Markdown | JSON | MCP    

TLDR: NOKOGIRI (tldr-pages)

An HTML, XML, SAX, and Reader parser.

  • 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}}
NOKOGIRI(1)                                                                              NOKOGIRI(1)



NAME
       nokogiri - an HTML, XML, SAX, and Reader parser

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 <uri|path> [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 <uri|path>
           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'



                                             2022-01-27                                  NOKOGIRI(1)

Generated by phpman v3.7.12 Author: Che Dong Under GNU General Public License
2026-06-13 12:29 @216.73.216.28
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!