Skip to content

Duplicate ?xml when rendering the document #689

@ThePlenkov

Description

@ThePlenkov

Hi!

I'm testing it now using this page: https://naturalintelligence.github.io/fast-xml-parser/

I noticed that if I provide XML like this:

<?xml version="1.0" encoding="utf-8"?>
<test></test>

it generates me the JSON like this:

{
    "?xml": {
        "@_version": "1.0",
        "@_encoding": "utf-8"
    },
    "test": ""
}

now when I render XML again I have ?xml node described twice:

<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<test></test>

and if I parse such XML of course it fails.

Could you please check why? Is it a bug of the library or just the UI issue? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions