hipchat / x2js

This library provides XML to JSON (JavaScript Objects) and vice versa javascript conversion functions. The library is very small and doesn't require any other additional libraries. Forked from https://code.google.com/p/x2js/
0 stars 2 forks source link

ReferenceError: "ActiveXObject" is not defined error thrown #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Pass a XML string to x2js.xml_str2json()
2.
3.

What is the expected output?
I expect a JSON object representation of the XML

What do you see instead? ReferenceError: "ActiveXObject" is not defined

What version of the product are you using? 1.1.5

On what operating system and browser version? using it in a server-side 
scripting. 

Please provide any additional information below.

Original issue reported on code.google.com by ccana...@gmail.com on 30 Jul 2014 at 10:42

GoogleCodeExporter commented 9 years ago
<?xml version="1.0" encoding="UTF-8"?>
<lists type="array">
  <list>
    <audience-id type="integer">2</audience-id>
    <active-people-count type="integer">1675</active-people-count>
    <channel-list type="boolean">false</channel-list>
    <checked-by-default type="boolean" nil="true"/>
    <created-at type="datetime">2013-05-23T17:45:58Z</created-at>
    <deleted-at type="datetime" nil="true"/>
    <description nil="true"/>
    <id type="integer">321</id>
    <inactive-people-count type="integer">10</inactive-people-count>
    <name>1a - STREAMSEND SUPPORT</name>
    <pending-people-count type="integer">0</pending-people-count>
    <public type="boolean" nil="true"/>
    <status>idle</status>
    <unsubscribed-people-count type="integer">284</unsubscribed-people-count>
    <updated-at type="datetime">2013-05-23T17:45:58Z</updated-at>
  </list>
  <list>
    <audience-id type="integer">2</audience-id>
    <active-people-count type="integer">113</active-people-count>
    <channel-list type="boolean">false</channel-list>
    <checked-by-default type="boolean" nil="true"/>
    <created-at type="datetime">2013-09-09T07:58:28Z</created-at>
    <deleted-at type="datetime" nil="true"/>
    <description nil="true"/>
    <id type="integer">457</id>
    <inactive-people-count type="integer">58</inactive-people-count>
    <name>AA 2012 Andrew List Streamsend</name>
    <pending-people-count type="integer">0</pending-people-count>
    <public type="boolean" nil="true"/>
    <status>idle</status>
    <unsubscribed-people-count type="integer">2</unsubscribed-people-count>
    <updated-at type="datetime">2013-09-09T07:58:28Z</updated-at>
  </list>
</lists>

Original comment by ccana...@gmail.com on 30 Jul 2014 at 10:43

GoogleCodeExporter commented 9 years ago
Hello!
Could you provide error line number also please? I don't have any server side 
environments here but have some thoughts.

Original comment by abdulla....@gmail.com on 30 Jul 2014 at 12:35

GoogleCodeExporter commented 9 years ago
ReferenceError: "ActiveXObject" is not defined. 
(canariawerx.lib.xml2json.min.js#1)

Original comment by ccana...@gmail.com on 31 Jul 2014 at 1:05

GoogleCodeExporter commented 9 years ago
I have the same issue. Line 510

Original comment by ana.mont...@mergephase.com on 4 Sep 2014 at 6:45

GoogleCodeExporter commented 9 years ago
I have the same issue on parsing xml to json on server side.
will there be any fix for this issue in near future ?

Original comment by aren.d...@gmail.com on 28 Oct 2014 at 2:41

GoogleCodeExporter commented 9 years ago
Same issue here.

Not sure how to fix?

Original comment by hengdi.z...@gmail.com on 27 Nov 2014 at 12:05

andrew-whitegiver commented 8 years ago

Same issue here. Doesn't work on server side, but works fine in a browser.

jwedster commented 8 years ago

Same issue here. Server-side fail.