5 Replies Latest reply on Jun 14, 2010 2:52 PM by laxmidi

    Does E4X Work with Internet Explorer?

    laxmidi Level 1

      Hi

       

      I've got a Flex 3 project. I'm having a problem with XML in Internet Explorer only.

       

      Does E4X work with IE?

       

      Thank you.

       

      -Laxmidi

        • 1. Re: Does E4X Work with Internet Explorer?
          David_F57 Level 5

          hi,

           

          IE error checks xml, its no surprise that a lot of xml fails in ie due to it being malformed, firefox and chrome happily display poor xml structure.

           

           

          David.

          1 person found this helpful
          • 2. Re: Does E4X Work with Internet Explorer?
            laxmidi Level 1

            Hi David,

             

            Thanks for the message.

             

            I don't get an XML error and the xml validates in http://www.w3schools.com/dom/dom_validate.asp.

             

            Could there still be an error that IE doesn't like?

             

            I've read that IE needs the content-type set. Is this true? If so, how do I do so?

             

            Any advice?

             

            Thanks,

             

            Laxmidi

            • 3. Re: Does E4X Work with Internet Explorer?
              Ansury Level 3

              Browser support

              E4X is currently supported by Mozilla's Rhino, used in OpenOffice.org and several other projects, and SpiderMonkey, used in Firefox, Thunderbird, and other XUL-based applications. It is also supported by Tamarin, the JavaScript engine used in the Flash virtual machine. It is not currently supported by Nitro (Safari), V8 (Google Chrome), or Internet Explorer.[1]

               

               

               

              Since I have obnoxious tendencies, also (sorry):

               

              http://tinyurl.com/32r44n5

               

               

              IMO - Not sure what you're doing or whether you need to use this extension, but I'd be afraid of using anything that is likely to break one of the major advantages Flex has over AJAX/DHTML hacking (cross browser compatibility).

              • 4. Re: Does E4X Work with Internet Explorer?
                laxmidi Level 1

                Hi Ansury,

                 

                Thanks for the message.

                 

                Actually, I've read the wikipedia entry regarding E4X and that's why I posed my question. I'm a little confused.

                 

                I've got some E4X in my project and it appears to work fine in IE.

                 

                But, I've got another bit where IE barfs. For some reason, IE doesn't like these 2 lines:

                 

                  _clickURL = xhtml.a.@href.toString();

                  _mediaSource = xhtml.a.img.@src.toString();

                 

                Is there any reason that IE can't parse the above?

                 

                If IE can parse this then I know that there is a problem with my XML (even though it validates). Has anyone used the format above in IE successfully? If not, is there a work around?

                 

                My XML file doesn't have a content type. Is that causing the problem for IE?

                 

                Other ideas?

                 

                 

                Thank you.

                 

                -Laxmidi

                • 5. Re: Does E4X Work with Internet Explorer?
                  laxmidi Level 1

                  Okay, the problem was case sensitivity.

                   

                  This worked in Safari and Firefox:

                   

                  _clickURL = xhtml.a.@href.toString();

                  _mediaSource = xhtml.a.img.@src.toString();

                   

                   

                  This worked in IE:

                   

                  _clickURL = xhtml.A.@href.toString();

                  _mediaSource = xhtml.A.IMG.@src.toString();

                   

                  The xml was the same in Safari and IE, except that IE capitalized the HTML tags. When Safari returned the xml, the html tags were lower-case.

                   

                  Thank you.

                   

                  -Laxmidi