[w3c/DOM-Parsing] Serialization of the XML declaration (#50)

```html
<!DOCTYPE html>
...<script>
var input = '<?xml version="1.0" encoding="windows-1252"?><root><child1>value1</child1></root>';
var parser = new DOMParser();
var doc = parser.parseFromString(input, 'text/xml');
w(new XMLSerializer().serializeToString(doc))
</script>
```

logs:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<root><child1>value1</child1></root>
```
in Firefox,

```xml
<?xml version="1.0" encoding="windows-1252"?><root><child1>value1</child1></root>
```
in Chrome and WebKit, and

```xml
<root><child1>value1</child1></root>
```

per spec.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/DOM-Parsing/issues/50

Received on Tuesday, 2 April 2019 07:58:03 UTC