Skip to content

DOCTYPE declaration cannot be parsed #13

Closed
@misitoth

Description

@misitoth

I want to convert standard MLP (Mobile Positioning Protocol) xml to JSON and back.
Here is the first 3 line:

%extension;]>

<svc_init ver="3.0.0">

After it is converted to JSON:
{
"_declaration": {
"_attributes": {
"version": "1.0",
"encoding": "UTF-8"
}
},
"svc_init": {
"_attributes": {
"ver": "3.0.0"
}

convert.xml2json(xml, { compact: true, spaces: 6, ignoreCdata: false });
I lost !DOCTYPE.

Can you add ignoreDoctype to the code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions