Xmllint parser warning : Unsupported version '1.1'

What am I doing wrong? Isn’t version 1.1 supported by xmllint? What can I do to make it accept this version 1.1?
BTW. Jenkins has a config.xml like this.

A little example

<?xml version="1.1"?>
$ xmllint /tmp/t.xml 
/tmp/t.xml:1: parser warning : Unsupported version '1.1'
<?xml version="1.1"?>
<?xml version="1.1"?>

libxml2 and xmllint don’t support XML 1.1.

OK Thanks for confirming.

But then questions are:

  • why? just curious, what makes it so hard to support 1.1?
  • why doesn’t the man page say anything about? After almost 20 years it might be time to mention something in the man-page.
  • what is the alternative to check or re-format XML 1.1?

See this answer on Stackoverflow: XML version 1.1 not accepted by browsers? - Stack Overflow

Thanks. I already did see that 2010 answer.

In the meantime, in 2017 (already 6+ years ago), Jenkins decided [1] to store their XML files as XML 1.1. So, now you get that annoying warning when you process Jenkins XML files though xmllint. Of course it is possible to use the --nowarning command line option, but then you loose all the warnings. I don’t know any alternative for xmllint.

[1] Upgrading to Jenkins LTS 2.107.x

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.