Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.03 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.03 KB

xmllint is a wrapper over xmllint from libxml2-utils.

The goal is to implement --xpath switch for very old version of xmllint and to have newlines delimited output. (Unlike version < 2.9.9).
Require bash and... xmllint

Example with wrapper:

$ xmllint --html --xpath '//a/@href' http://www.w3.org/
href="/"
href="/standards/"
href="/participate/"
(...)

Example without wrapper:

$ xmllint --html --xpath '//a/@href' http://www.w3.org/
 href="/" href="/standards/" href="/participate/" href="/Consortium/membership"

Another approach

Install a subsystem: https://serverfault.com/a/1022826/120473

edit 20180923: for newline delimited output, bug fixed upstream in libxml2-utils v2.9.9, check