3 ms·
curl https://news.ycombinator.com/ | xq yields: <title>Hacker News</title>XML syntax error on line 4: element <link> closed by </head> 1
by jll29 4y ago
curl https://news.ycombinator.com/ | xq
yields:
<title>Hacker News</title>XML syntax error on line 4: element <link> closed by </head>
1
- jimsmart 4y agoAccording to the README on Github main page for the project, you need to provide the -m flag when working with HTML. — The tool parses XML by default, which is much stricter than HTML. Hence the error you are seeing (in HTML5, one can omit various close tags and the HTML is still 100% valid — that's what you are encountering here) HTH