GithubHelp home page GithubHelp logo

Comments (4)

 avatar commented on July 24, 2024 2

I suspect that you are using this library from NodeJS. The README notes that this lib is intended for browser use only and that Node is not supported. However, there is a suggestion in the README for a workaround.

When running in a proper browser environment, I received the following results

{
  "manifest": [{
    "_attr": {
      "xmlns:android": {
        "_value": "http://schemas.android.com/apk/res/android",
        "_ns": "http://www.w3.org/2000/xmlns/"
      },
      "package": {
        "_value": "com.android.vending"
      },
      "platformBuildVersionCode": {
        "_value": 26
      },
      "platformBuildVersionName": {
        "_value": "8.0.0"
      }
    },
    "uses-permission": [{
      "_attr": {
        "name": {
          "_value": "com.google.android.c2dm.permission.RECEIVE",
          "_ns": "http://schemas.android.com/apk/res/android"
        }
      },
      "_text": [null]
    }],
    "uses-feature": [{
      "_attr": {
        "glEsVersion": {
          "_value": 0,
          "_ns": "http://schemas.android.com/apk/res/android"
        }
      },
      "_text": [null]
    }],
    "application": [{
      "_attr": {
        "allowBackup": {
          "_value": true,
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "alwaysRetainTaskState": {
          "_value": true,
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "anyDensity": {
          "_value": true,
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "hardwareAccelerated": {
          "_value": true,
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "icon": {
          "_value": "@mipmap/icon",
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "label": {
          "_value": "@string/app_name",
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "largeHeap": {
          "_value": true,
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "launchMode": {
          "_value": "singleInstance",
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "name": {
          "_value": "com.android.vending.LiveApplication",
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "normalScreens": {
          "_value": true,
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "persistent": {
          "_value": false,
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "screenOrientation": {
          "_value": "portrait",
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "supportsRtl": {
          "_value": true,
          "_ns": "http://schemas.android.com/apk/res/android"
        },
        "theme": {
          "_value": "@style/AppTheme",
          "_ns": "http://schemas.android.com/apk/res/android"
        }
      },
      "meta-data": [{
        "_attr": {
          "name": {
            "_value": "APPKEY",
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "value": {
            "_value": 10505945,
            "_ns": "http://schemas.android.com/apk/res/android"
          }
        },
        "_text": [null]
      }],
      "receiver": [{
        "_attr": {
          "exported": {
            "_value": true,
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "name": {
            "_value": "com.google.android.gms.gcm.GcmReceiver",
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "permission": {
            "_value": "com.google.android.c2dm.permission.SEND",
            "_ns": "http://schemas.android.com/apk/res/android"
          }
        },
        "intent-filter": [{
          "action": [{
            "_attr": {
              "name": {
                "_value": "com.google.android.c2dm.intent.RECEIVE",
                "_ns": "http://schemas.android.com/apk/res/android"
              }
            },
            "_text": [null]
          }],
          "category": [{
            "_attr": {
              "name": {
                "_value": "gcm.play.android.samples.com.gcmquickstart",
                "_ns": "http://schemas.android.com/apk/res/android"
              }
            },
            "_text": [null]
          }]
        }]
      }],
      "service": [{
        "_attr": {
          "exported": {
            "_value": false,
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "name": {
            "_value": "com.gcm.MyGcmListenerService",
            "_ns": "http://schemas.android.com/apk/res/android"
          }
        },
        "intent-filter": [{
          "action": [{
            "_attr": {
              "name": {
                "_value": "com.google.android.c2dm.intent.RECEIVE",
                "_ns": "http://schemas.android.com/apk/res/android"
              }
            },
            "_text": [null]
          }]
        }]
      }, {
        "_attr": {
          "exported": {
            "_value": false,
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "name": {
            "_value": "com.gcm.MyInstanceIDListenerService",
            "_ns": "http://schemas.android.com/apk/res/android"
          }
        },
        "intent-filter": [{
          "action": [{
            "_attr": {
              "name": {
                "_value": "com.google.android.gms.iid.InstanceID",
                "_ns": "http://schemas.android.com/apk/res/android"
              }
            },
            "_text": [null]
          }]
        }]
      }],
      "activity": [{
        "_attr": {
          "configChanges": {
            "_value": "keyboardHidden|orientation|screenSize",
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "exported": {
            "_value": false,
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "launchMode": {
            "_value": "singleTop",
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "name": {
            "_value": "com.linecorp.linesdk.auth.internal.LineAuthenticationActivity",
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "theme": {
            "_value": "@style/LineSdk_AuthenticationActivity",
            "_ns": "http://schemas.android.com/apk/res/android"
          }
        },
        "_text": [null]
      }, {
        "_attr": {
          "configChanges": {
            "_value": "keyboardHidden|orientation|screenSize",
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "exported": {
            "_value": true,
            "_ns": "http://schemas.android.com/apk/res/android"
          },
          "name": {
            "_value": "com.android.vending.MainActivity",
            "_ns": "http://schemas.android.com/apk/res/android"
          }
        },
        "intent-filter": [{
          "action": [{
            "_attr": {
              "name": {
                "_value": "android.intent.action.VIEW",
                "_ns": "http://schemas.android.com/apk/res/android"
              }
            },
            "_text": [null]
          }],
          "category": [{
            "_attr": {
              "name": {
                "_value": "android.intent.category.DEFAULT",
                "_ns": "http://schemas.android.com/apk/res/android"
              }
            },
            "_text": [null]
          }, {
            "_attr": {
              "name": {
                "_value": "android.intent.category.BROWSABLE",
                "_ns": "http://schemas.android.com/apk/res/android"
              }
            },
            "_text": [null]
          }],
          "data": [{
            "_attr": {
              "scheme": {
                "_value": "lineauth",
                "_ns": "http://schemas.android.com/apk/res/android"
              }
            },
            "_text": [null]
          }]
        }]
      }]
    }]
  }]
}

from xmltojson.

tfKamran avatar tfKamran commented on July 24, 2024 1

Getting the same error when I try to parse your own example:

testString = '<xml><a>It Works!</a></xml>';
result = xmlToJSON.parseString(testString);

from xmltojson.

evgenitsn avatar evgenitsn commented on July 24, 2024

+1

from xmltojson.

tfKamran avatar tfKamran commented on July 24, 2024

Ok, closing this issue.

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.