Skip to content

Serialize XML declaration #13

Description

@xmedeko

The XML declaration is not serialized, try the code:

let doc = new window.DOMParser().parseFromString('<?xml version="1.0" encoding="utf-8" standalone="yes"?><a>Ahoy</a>', 'application/xml');
console.log(new window.XMLSerializer().serializeToString(doc));

Chrome output: <?xml version="1.0" encoding="utf-8" standalone="yes"?><a>Ahoy</a>
jsdom 15.1.1, w3c-xmlserializer 1.1.2 output: <a>Ahoy</a>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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