Are the comments in the request reply. if so IE cannot handle this and
will always fail.
Solution remove the comments from the request reply

On Jun 17, 11:56 pm, Eneko Alonso <[email protected]> wrote:
> I sent an email a copule of weeks ago about an issue parsing XML withg
> Mootools on IE browsers, something that jQuery does fine, as you can see on
> the next example.Notice the ajax request is done in Mootools, even when the
> xml is parsed by jQuery.
>
> On this project I have both Mootools and jQuery, so I'm fine, but what if I
> had only Mootools?
>
>         this.request = new Request({
>             method: 'get',
>             url: this.gallery.photosFeed + '&' + Hash.toQueryString({start:
> 0, end: 10}),
>
>             onSuccess: function(text, xml) {
>                 if (!$defined(xml)) {
>                     console.warn('Gallery XML is empty.')
>                     return;
>                 }
>
>                 // *** MOOTOOLS CODE FAILS ON IE BROWSERS ***
>                 // xml.getElements('document').each(function(photo, index) {
>                 //     var pic = {
>                 //         docId:
>     photo.getElement('fileentryid').get('text'),
>                 //         userId:
>    photo.getElement('userid').get('text'),
>                 //         title:     photo.getElement('title').get('text'),
>                 //         ownerName:
> photo.getElement('userfullname').get('text'),
>                 //         rating:
>    photo.getElement('rating').get('text').toFloat(),
>                 //         created:   new
> Date(photo.getElement('createdate').get('text') * 1000),
>                 //         images:   {}
>                 //     }
>                 //     photo.getElements('image').each(function(image) {
>                 //         pic.images[image.get('label')] =
> image.getElement('url').get('text')
>                 //     });
>                 //     var photoThumb = new PhotoThumb({data: pic});
>                 //     this.gallery.photos.push(photoThumb);
>                 //     this.photosList.grab(photoThumb.element);
>                 // }.bind(this));
>
>                 jQuery(xml).find('document').each(function(index, photo) {
>                     photo = jQuery(photo);
>                     var pic = {
>                         docId:     photo.find('fileentryid').text(),
>                         userId:    photo.find('userid').text(),
>                         title:     photo.find('title').text(),
>                         ownerName: photo.find('userfullname').text(),
>                         rating:    photo.find('rating').text().toFloat(),
>                         created:   new Date(photo.find('createdate').text()
> * 1000),
>                         images:   {}
>                     }
>                     var images = photo.find('image');
>                     images.each(function() {
>                         var image = jQuery(this);
>                         pic.images[image.attr('label')] =
> image.find('url').text();
>                     });
>
>                     // This code does not change from avobe
>                     var photoThumb = new PhotoThumb({data: pic});
>                     this.gallery.photos.push(photoThumb);
>                     this.photosList.grab(photoThumb.element);
>                 }.bind(this));
>             }.bind(this),
>
>             onFailure: function() {
>                 console.warn('Gallery feed could not be loaded.');
>             }
>         });
>         this.request.send();

Reply via email to