dwr convertXml的bug
读dwr的engine.js源码,看到convertXml这个方法:
[xhtml:showcolumns]
·········10········20········30········40········50········60········70········80········90········100·······110·······120·······130·······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,这个在IE6下面不支持。
toXml,ff和ie6下面都undefined,估计是自定义转化xml的方法名吧。
最后一个data.innerHTML,是针对html dom对象的。
如果过传的是对象是构造的xml对象,如下构造的:
[xhtml:showcolumns]
·········10········20········30········40········50········60········70········80········90········100·······110·······120·······130·······140·······150
function stringToXML(xmlData){
if (window.ActiveXObject) {
- 发表评论
-
- 最新评论 更多>>