You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2007/08/29 00:36:15 UTC
svn commit: r570598 -
/incubator/xap/trunk/codebase/src/xap/data/datasource/SimpleDocumentDataSource.js
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;
-}
+};