{
    "mode": "man",
    "parameter": "NOKOGIRI",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/NOKOGIRI/1/json",
    "generated": "2026-06-14T00:17:14Z",
    "sections": {
        "NAME": {
            "content": "nokogiri - an HTML, XML, SAX, and Reader parser\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri’s many features is the\nability to search documents via XPath or CSS3 selectors.  The nokogiri command parses a\ndocument, and launches an interactive ruby session (irb(1)), allowing one to analysing the\nresult interactively.\n",
            "subsections": []
        },
        "SYNOPSYS": {
            "content": "nokogiri <uri|path> [options]\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--type [TYPE]\nSet the type of the document to be parsed\n",
            "subsections": [
                {
                    "name": "-E --encoding",
                    "content": "Set the encoding of the document\n",
                    "flag": "-E",
                    "long": "--encoding"
                },
                {
                    "name": "-e",
                    "content": "Specifies script from command-line\n\n--rng <uri|path>\nValidate using this rng file\n\n-?, --help\nShow a message very similar to this man page\n",
                    "flag": "-e"
                },
                {
                    "name": "-v --version",
                    "content": "Show the version of the program\n",
                    "flag": "-v",
                    "long": "--version"
                }
            ]
        },
        "EXAMPLES": {
            "content": "nokogiri http://www.ruby-lang.org/\n\nnokogiri ./public/index.html\n\ncurl -s http://nokogiri.org | nokogiri -e'p $.css(\"h1\").length'\n\n\n\n2022-01-27                                  NOKOGIRI(1)",
            "subsections": []
        }
    },
    "summary": "nokogiri - an HTML, XML, SAX, and Reader parser",
    "flags": [
        {
            "flag": "-E",
            "long": "--encoding",
            "arg": null,
            "description": "Set the encoding of the document"
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": "Specifies script from command-line --rng <uri|path> Validate using this rng file -?, --help Show a message very similar to this man page"
        },
        {
            "flag": "-v",
            "long": "--version",
            "arg": null,
            "description": "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)"
    ],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "An HTML, XML, SAX, and Reader parser.",
        "examples": [
            {
                "description": "Parse the contents of a URL or file",
                "command": "nokogiri {{url|path/to/file}}"
            },
            {
                "description": "Parse as a specific type",
                "command": "nokogiri {{url|path/to/file}} --type {{xml|html}}"
            },
            {
                "description": "Load a specific initialization file before parsing",
                "command": "nokogiri {{url|path/to/file}} -C {{path/to/config_file}}"
            },
            {
                "description": "Parse using a specific encoding",
                "command": "nokogiri {{url|path/to/file}} {{-E|--encoding}} {{encoding}}"
            },
            {
                "description": "Validate using a RELAX NG file",
                "command": "nokogiri {{url|path/to/file}} --rng {{url|path/to/file}}"
            }
        ]
    }
}