[OpenLayers-Dev] Why check the fileType of ajax request for xml?
Tim Schaub
tschaub at openplans.org
Wed Mar 12 10:26:21 EDT 2008
Hey-
Tim Schaub wrote:
> Hey-
>
> XinGang Li wrote:
>> In the layers that load data from xml stream, we always check the
>> fileType like this:
>>
>> requestSuccess:function(request) {
>> if (this.features) {
>> var doc = request.responseXML;
>>
>> if (!doc || request.fileType!="XML") {
>> doc = OpenLayers.parseXMLString(request.responseText);
>> }
>> ......
>>
>> I tested on IE6 and firefox2, the fileType is undefined, and this will
>> force re-parse the xml string.
>>
>
> You're absolutely right. Thanks for the catch.
>
> So, anybody using WFS, GML, or GeoRSS layers has been forcing the
> browser to parse the request.responseText unnecessarily.
>
> Patch is in ticket for ticket #1428.
And in the trunk with r6496.
>
> Tim
>
>> --
>> Li XinGang
>> EMail: slinavlee at gmail.com <mailto:slinavlee at gmail.com>
>> Blog: avlee.cnblogs.com <http://avlee.cnblogs.com>
>> Site: www.mapboost.org.cn <http://www.mapboost.org.cn>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>
>>
>> !DSPAM:4033,47d765f9323842458217002!
>
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
> !DSPAM:4033,47d7e5e9251261849620573!
>
More information about the Dev
mailing list