I have develloped a JavaScript component that converts XMLDom (AJAX) document into an equivalent JavaScript Object, preserving both node and attribute names. Recently I was trying to fix a site that utilizes this component and is working on every other browser except Safari. What I have discovered shocked me. It turns out that when i'm iterating through XMLNodeAttributes collection all the attribute names are returned in lower case thus overriding what was initialy set in XML. Since I use case sensative way to access attribute values in JavaScript Object, those attributes that had both caps and lower case become inaccessible and logic breaks.
Hi Sam, thanks for the bug report! Have you tried running this on a WebKit nightly build? There have been many improvements since Safari 2.0.x in the WebKit browser engine. http://nightly.webkit.org/
The bug URL is 404 now. Also, there is no such thing as XMLNodeAttributes in WebKit, so it's hard to re-create the problem from description. If I were to guess, this is indeed a bug that has been fixed: the following snippet works in nightly builds, but not in shipping Safari. doc = (new DOMParser).parseFromString("<doc Attr1='1' attr1='11'/>", "application/xml"); for (i = 0; i < doc.documentElement.attributes.length; ++i) document.write("<p>" + doc.documentElement.attributes[i].name + "</p>"); Please reopen this bug if your case is different, and still fails in nightly builds.
Reopening to attach new patch.
Created attachment 177874 [details] Patch
Comment on attachment 177874 [details] Patch I'm sorry to apply my patch to wrong bug number. It was a patch for bug 103347 not 13347.
Mass moving XML DOM bugs to the "DOM" Component.