Comments (4)
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.
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.
+1
from xmltojson.
Ok, closing this issue.
from xmltojson.
Related Issues (20)
- Add license in bower.json and .min.js HOT 1
- Update module on npm HOT 7
- Cannot iterate children at proper order HOT 7
- When attribute name of an element have ":" character, does not parse HOT 1
- oXMLParent.hasChildNodes is not a function HOT 1
- Add the proper require() statement to your Readme.md file HOT 1
- Internal state (options) can be modified asynchronously HOT 2
- Cannot get it working with latest angular-cli with webpack HOT 4
- Doesn't work in NodeJS HOT 5
- syntax error display on console when call xml_str2json() on firefox HOT 2
- How to convert XML to JSON in an external reference HOT 3
- How to force to dispaly 0 after decimal? HOT 1
- Implement promises for asynchronous parsing of XML
- Improve examples in README
- Improve test coverage
- Migrate to latest Jasmine (2.8.x)
- Add support for processing instructions and comments HOT 2
- Migrate to DOM4
- Support node v20.13.1 or latest
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmltojson.