Serialization of the XML declaration
Open
Nobody has claimed this yet.
xml-serialization
- Dominant language
- HTML
- Stars
- 28
- Forks
- 14
- Avg merge
- 3h 10m
- Merged PRs (30d)
- 1
Description
<!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 version="1.0" encoding="UTF-8"?>
<root><child1>value1</child1></root>
in Firefox,
<?xml version="1.0" encoding="windows-1252"?><root><child1>value1</child1></root>
in Chrome and WebKit, and
<root><child1>value1</child1></root>
per spec.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the DOMParser/XMLSerializer example in the issue and compare the Firefox, Chrome/WebKit, and specification outputs. Trace the serialization behavior in the DOM Parsing and Serialization project, then verify that the XML declaration encoding matches the specified result across the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100