XML Parser not readable in Firefox

I am parsing my XML file in HTML and it parses well when I run it in Chrome/Edge browsers, but when I run it in Firefox, it throws this error:

XML Parsing Error: not well-formed
Line Number 21, Column 2:

This is my HTML where I parse it:

var xml = new XMLHttpRequest();
        xml.onreadystatechange = function () {
            if (xml.readyState == XMLHttpRequest.DONE) {
                var xmlData = xml.responseXML;
                if (!xmlData) {
                    xmlData = (new DOMParser()).parseFromString(xml.responseText, 'text/xml');
                    var PDF = xmlData.getElementsByTagName("PDF");
                    var web = PDF[0].getElementsByTagName("link")[0].firstChild.data;

        xml.open('GET', 'List.xml', true);
<?xml version = "1.0" ?>




Your XML is not well-formed. Remove the last </xml> tag.

The <?xml version = "1.0" ?> construct is not a opening element tag that has to be closed. It is an XML declaration.