xmllint
does work fine with http://somesite.xml
But it doesn't work with https://somesite.xml
xmllint https://somesite.xml
warning: failed to load external entity "https://somesite.xml"
xmllint
does work fine with http://somesite.xml
But it doesn't work with https://somesite.xml
xmllint https://somesite.xml
warning: failed to load external entity "https://somesite.xml"
As a workaround, you could use another utility like curl
or wget
to download the file first, then pipe it to xmllint
.
curl --silent "https://somesite.xml" | xmllint -
Notes:
-
("hyphen/minus") for xmllint
's filename argument to get its XML input from the standard input stream instead of from a file or URL.--silent
(-s
) to suppress curl
progress/error messages, to prevent those from being parsed by xmllint
.This should work for xmllint
's XML input over HTTPS, but not sure about a DTD or schema; you might need to download that to a local file first, using a separate curl
or wget
command.
schemaLocation
. Only one single schema file can be provided using the --schema
parameter. The only workaround for that would be to download all imported schemas and modify their schemaLocation
to relative URLs. –
Pantsuit It is not directly a replacement for xmllint
as a command-line tool, but the VS Code XML plugin supports automatic downloading of XML schemas via HTTPS.
© 2022 - 2024 — McMap. All rights reserved.
schemaLocation="file:///tmp/my-path.xsd"
– Rennesxmllint
doesn't support HTTPS and probably never will." according to gitlab.gnome.org/GNOME/libxml2/-/issues/160 – Pantsuit