incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r570598 - /incubator/xap/trunk/codebase/src/xap/data/datasource/SimpleDocumentDataSource.js
Date Wed, 29 Aug 2007 00:36:15 GMT
Author: jmargaris
Date: Tue Aug 28 17:36:15 2007
New Revision: 570598

URL: http://svn.apache.org/viewvc?rev=570598&view=rev
Log:
use responseXML if it exists - more reliable than parsing the
text which has IE problems for non-UTF encodings

Modified:
    incubator/xap/trunk/codebase/src/xap/data/datasource/SimpleDocumentDataSource.js

Modified: incubator/xap/trunk/codebase/src/xap/data/datasource/SimpleDocumentDataSource.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/datasource/SimpleDocumentDataSource.js?rev=570598&r1=570597&r2=570598&view=diff
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/datasource/SimpleDocumentDataSource.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/datasource/SimpleDocumentDataSource.js Tue Aug
28 17:36:15 2007
@@ -81,10 +81,15 @@
  * of the data source.
  */
 xap.data.datasource.SimpleDocumentDataSource.prototype.responseToDataSource = function(response){
+	var doc = null;
 	var parser = xap.xml.ParserFactory.getParser();
-	var doc = parser.parse( response.responseText );
+	if(response.responseXML && parser.importNativeDocument) {
+		doc = parser.importNativeDocument( response.responseXML );
+	} else {
+		doc = parser.parse( response.responseText );
+	}
 	return doc;
-}
+};
 
 
 



Mime
View raw message