Read the engine. js source code of dwr and see the convertXml method:
[Xhtml: showcolumns]
··· · 50 ······· · 90 ····· · 140 · 150
/**
* Marshall an object
* @ Private
* @ See dwr. engine. serialize. convert () for parameter details
*/
ConvertXml: function (batch, referto, data, name, depth ){
Var output;
If (window. XMLSerializer) output = new XMLSerializer (). serializeToString (data );
Else if (data. toXml) output = data. toXml;
Else output = data. innerHTML;
Return "xml:" + encodeURIComponent (output );
}
XMLSerializer is used, which is not supported in IE6.
ToXml, ff, and ie6 are all undefined. It is estimated that it is the method name for custom xml Conversion.
The last data. innerHTML is for html dom objects.
If the uploaded object is a constructed xml object, it is constructed as follows:
[Xhtml: showcolumns]
··· · 50 ······· · 90 ····· · 140 · 150
Function stringToXML (xmlData ){
If (window. ActiveXObject ){
// For IE
XmlDoc = new ActiveXObject ("Microsoft. XMLDOM ");
XmlDoc. async = "false ";
XmlDoc. loadXML (xmlData );
Return xmlDoc;
}
Else
If (document. implementation & document. implementation. createDocument ){
// For ILA
Parser = new DOMParser ();
XmlDoc = parser. parseFromString (xmlData, "text/xml ");
Return xmlDoc;
}
}
In this way, the test is successful only in ff. The method XMLSerializer is executed, and an error is reported in IE6,
I checked it online. ie9 mentioned above supports XMLSerializer.
Haha... The younger brother looks at the source code and test results. I don't know if there is anything wrong with it. If so, please point it out. Thank you?
From lazy Tom