GithubHelp home page GithubHelp logo

Comments (8)

 avatar commented on July 24, 2024

I don't have a copy of IE8 lying around, so I can't test this behavior. It looks as though the xmlns option is being set differently. Can you verify that in each case, the xmlToJson configuration options are the same?

from xmltojson.

julkue avatar julkue commented on July 24, 2024

I've tested with the default values, so without any custom settings.

from xmltojson.

 avatar commented on July 24, 2024

Try setting the xmlns option to false. This should force consistent behavior between the two browsers. It looks as though IE 8 doesn't properly support the namespaceURI attribute. If so, it's forcing the evaluation to false. Let me know.

from xmltojson.

julkue avatar julkue commented on July 24, 2024

After setting xmlns = fase the difference between Firebox and IE will be:
Firefox:

      "_attr": {
        "xmlns:xsi": {"_value": "http://www.w3.org/2001/XMLSchema-instance"},
        "noNamespaceSchemaLocation": {"_value": "../xsd/HTMLVideoMapper.xsd"}
      },

IE8:

      "_attr": {
        "xmlns:xsi": {"_value": "http://www.w3.org/2001/XMLSchema-instance"},
        "noNamespaceSchemaLocation": {
          "_value": "../xsd/HTMLVideoMapper.xsd",
          "_ns": "http://www.w3.org/2001/XMLSchema-instance"
        }
      },

So in fact setting the xmlns will not affect changes between those browsers

from xmltojson.

 avatar commented on July 24, 2024

It looks as though the output is consistent. IE added the _ns value, but the object naming and values are otherwise identical which should give consistent and predictable behavior between browsers. I will update the documentation to indicate that the library is intended for IE9+ and close this issue.

from xmltojson.

julkue avatar julkue commented on July 24, 2024

Well, that's open source and you have the right to change requirements. But for me, that means a huge problem since I already started to implement your plugin today. Each XML2JSON-converter plugin will use different ways to handle attributes, texts, values and namespaces. So I will need to complete develop the enhancement again.
My target browser is IE 8 since it is a customer requirement. So for me that would mean, you are switching from IE7+ to IE9+ and killing the work of today.

For my understanding: What is the problem why there are such differences betwen IE8 and Firefox? Also, are there more things/features than namespaces that can be different in each browser?

from xmltojson.

 avatar commented on July 24, 2024

The difficulty lies in Microsoft’s support for DOM standards in IE8. The situation greatly improved with IE9. IE10+ are significantly better. Chrome, Firefox, and Safari implemented the DOM methods for XML much more rapidly and so support appears in earlier versions.

I updated the documentation to reflect that the library will work as expected for IE9+ . I also stated in the docs that the library can be reasonably and predictably used with IE 7 and 8 if you set the xmlns option to false.

I hope this helps, and I apologize if it does not. If you would like to submit a patch, I’d be happy to consider it. For now though, I have no intent of supporting outdated and non-standard browsers.

Best luck with your endeavors.

On Jan 28, 2015, at 12:47 PM, Julian [email protected] wrote:

Well, that's open source and you have the right to change requirements. But for me, that means a huge problem since I already started to implement your plugin today. Each XML2JSON-converter plugin will use different ways to handle attributes, texts, values and namespaces. My target browser is IE since it is a customer requirement. So for me that would mean, you are switching from IE7+ to IE9+ and killing the work.

For my understanding: What is the problem why there are such differences betwen IE8 and Firefox? Also, are there more things/features than namespaces that can be different in each browser?


Reply to this email directly or view it on GitHub #6 (comment).

from xmltojson.

julkue avatar julkue commented on July 24, 2024

The only thing left I don't understand is why setting xmlns to false will fix the differences from IE8 to Firefox. For me setting the value to false means that there should not appear any namespace attributes. But in IE8 those still exist (see my last example).
What am I missing? Why is settin xmlns to false a solution in this situation?

from xmltojson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.