1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-10 00:25:24 +02:00
tldr/pages/common/nokogiri.md

25 lines
569 B
Markdown
Raw Normal View History

2018-08-21 10:48:43 +01:00
# nokogiri
> An HTML, XML, SAX and Reader parser.
2025-05-04 20:03:26 +03:00
> More information: <https://manned.org/nokogiri>.
2018-08-21 10:48:43 +01:00
- Parse the contents of a URL or file:
2018-08-21 10:48:43 +01:00
`nokogiri {{url|path/to/file}}`
- Parse as a specific type:
`nokogiri {{url|path/to/file}} --type {{xml|html}}`
2022-06-27 12:23:12 +02:00
- Load a specific initialization file before parsing:
2018-08-21 10:48:43 +01:00
`nokogiri {{url|path/to/file}} -C {{path/to/config_file}}`
- Parse using a specific encoding:
2025-05-04 20:03:26 +03:00
`nokogiri {{url|path/to/file}} {{[-E|--encoding]}} {{encoding}}`
2018-08-21 10:48:43 +01:00
- Validate using a RELAX NG file:
`nokogiri {{url|path/to/file}} --rng {{url|path/to/file}}`