tldr/pages/common/nokogiri.md

25 lines
553 B
Markdown
Raw Normal View History

2018-08-21 10:48:43 +01:00
# nokogiri
> An HTML, XML, SAX and Reader parser.
2019-06-04 10:00:11 +01:00
> More information: <https://nokogiri.org>.
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}}`
- Load a specific initialisation file before parsing:
`nokogiri {{url|path/to/file}} -C {{path/to/config_file}}`
- Parse using a specific encoding:
`nokogiri {{url|path/to/file}} --encoding {{encoding}}`
- Validate using a RELAX NG file:
`nokogiri {{url|path/to/file}} --rng {{url|path/to/file}}`