Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

toJson exception - "not well formed" #176

Open
sidprice opened this issue May 3, 2019 · 0 comments
Open

toJson exception - "not well formed" #176

sidprice opened this issue May 3, 2019 · 0 comments

Comments

@sidprice
Copy link

sidprice commented May 3, 2019

I am trying to load an XML file on a local drive, the application is being written using VSCode and Electron on Windows. The file being loaded is available here:
https://gist.github.com/sidprice/3a97d92ed7ba12635c0ce37ec3c07153.

The call to xml2json is:
var json = xml2json.toJson(inputFile, {object: true, trim: true}) ;

The exception says:
Error: There are errors in your xml file: not well-formed (invalid token) at Object.module.exports [as toJson] (c:\DataRoot\Projects\DevicePackProcessor\node_modules\xml2json\lib\xml2json.js:173:15) at Object.doParsing (c:\DataRoot\Projects\DevicePackProcessor\src\parser.js:40:33) at EventEmitter.ipcMain.on (c:\DataRoot\Projects\DevicePackProcessor\src\main.js:68:12) at EventEmitter.emit (events.js:182:13) at WebContents.<anonymous> (C:\DataRoot\Projects\DevicePackProcessor\node_modules\electron\dist\resources\electron.asar\browser\api\web-contents.js:284:13) at WebContents.emit (events.js:182:13)

I have checked the input file against the XSD file and there are no errors.

Is this a problem with XML2JSON or my usage of it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant