DOMParser.parseFromString in IE 9 RC 1 rearranges the attributes of the XML node passed in - by C. Gerard Gallant

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


ID 645091 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 2/18/2011 5:13:47 AM
Access Restriction Public

Description

When I use the DOMParser's parseFromString function in IE 9 RC 1, the attributes of XML string get rearranged.

I only noticed the issue in the RC build so I'm not sure if it's there in the Platform Preview too.

The following is some simple code used to reproduce the issue:

var sXML = "<TEST ID=\"124\" TITLE=\"TitleValue\" DATE=\"2011-02-24T00:00:00\" STATUS=\"Processing\" EMPNAME=\"Smith, Sam\" STATUSCODE=\"P\" ROWNUM=\"1\" />";

var dpParser = new DOMParser();
var xdDoc = dpParser.parseFromString(sXML, "text/xml");

var xsSerialize = new XMLSerializer();
var sNewXML = xsSerialize.serializeToString(xdDoc);

alert("Original XML:\n" + sXML + "\n\nNew XML:\n" + sNewXML);



The alert's output...

Original XML: <TEST ID="124" TITLE="TitleValue" DATE="2011-02-24T00:00:00" STATUS="Processing" EMPNAME="Smith, Sam" STATUSCODE="P" ROWNUM="1" />

New XML: <TEST ROWNUM="1" STATUSCODE="P" EMPNAME="Smith, Sam" STATUS="Processing" DATE="2011-02-24T00:00:00" TITLE="TitleValue" ID="124" />
Sign in to post a comment.
Posted by Nathan Fast on 8/9/2011 at 9:07 AM
Could you please explain how this is by design?
Posted by Bhasker [MSFT] on 2/22/2011 at 6:52 PM
Thank you for your feedback.

The issue you are reporting is by design. Please re-activate the bug if you are seeing any errors/issues because of this.

Best regards,

The Internet Explorer Team