Closed Bug 429657 Opened 17 years ago Closed 16 years ago

Local xml file does not load anymore with JavaScript in FF 3 beta 5 (No problems with FF 2)

Categories

(Core :: XML, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: krbehiels, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 1.1.4322) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5 It seems that there is a problem with xmlDoc.load(...) because the data within the xml file I parse doesn't show on the page in FF3 beta5. Reproducible: Always Steps to Reproduce: 1.Load html file (autos.html) ex: file:///D:/Mijn%20Documenten/MCT2/Voorbeelden/XML/Hoofdstuk%205/Autos/autos.html 2. 3. Actual Results: Overzicht Expected Results: Overzicht . Porche 911 GT2 . Ferrari Enzo . Lamborghini Diablo auto.html code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Overzicht auto's</title> <script type="text/javascript" src="autos.js"> </script> </head> <body> <h2>Overzicht</h2> <div> <ul> <span id="autolijst"> </span> </ul> </div> </body> </html> auto.js code: window.onload = showHTML; function loadXMLDoc(filename) { var xmlDoc; if (window.ActiveXObject) { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); } else if (document.implementation && document.implementation.createDocument) { xmlDoc = document.implementation.createDocument("", "", null); } else { alert('Geen JavaScriptondersteuning gevonden!'); } xmlDoc.async = false; xmlDoc.load(filename); return xmlDoc; } function showHTML() { var xmlDoc = loadXMLDoc("autos.xml"); var autos = xmlDoc.getElementsByTagName('auto'); var autoLijst = document.getElementById('autolijst'); for (i = 0; i < autos.length; i++) { var listItem = "<li>"; listItem += autos[i].attributes[0].nodeValue; listItem += " "; listItem += autos[i].childNodes[0].nodeValue; listItem += "</li>" autoLijst.innerHTML += listItem; } } auto.xml code: <?xml version="1.0"?> <autos> <auto merk="Porche">911 GT2</auto> <auto merk="Ferrari">Enzo</auto> <auto merk="Lamborghini">Diablo</auto> </autos>
Please add a minimized testcase using the "Add an attachment" link.
Attached file html page (obsolete) (deleted) —
The html file should be in the same (local) directory as the xml file.
Attached file xml file (deleted) —
Use this with the html file.
Attached file Shorter version of the problem (deleted) —
A shorter version of the html file (of course with the same problem: FF2 OK, FF3beta5 bummer)
Attachment #316451 - Attachment is obsolete: true
Attached file Same html file in plain text (deleted) —
This got fixed by the fix for bug 425201.
Component: General → XML
Depends on: 425201
Product: Firefox → Core
QA Contact: general → xml
We should get the test in once we have file:// mochitests.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Depends on: 424484
Flags: in-testsuite?
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: