Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 7, 2021. It is now read-only.
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

toJson exception - "not well formed" #176

Open

Description

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /