WPT
wpt / domparsing / XMLSerializer-serializeToString.html
Spec: DOM Parsing and Serialization ↗
Runs: Chrome 155.0.8041.0 (wpt@18be93235, 2026-09-04) | Firefox 157.0a1 (wpt@18be93235, 2026-09-04) | Safari 251 preview (wpt@2c385f65e, 2026-09-04) | Ladybird 1.0-70fb3 (wpt@0c9001c53, 2026-09-04) | Servo Servo 0.6 (wpt@2c385f65e, 2026-09-04) | Blitz a50cb8971 (wpt@a95401e4e, 2026-09-03)
View on the Blitz WPT dashboard | Open test on wpt.live | wpt.fyi
| Chrome | Firefox | Safari | Ladybird | Servo | Blitz | |
|---|---|---|---|---|---|---|
| Total | 27/33 | 19/33 | 23/33 | 15/33 | 3/33 | NOT RUN |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| check XMLSerializer.serializeToString method could parsing xmldoc to string | PASS | PASS | PASS | PASS | PASS | — |
| check XMLSerializer.serializeToString method could parsing document to string | PASS | PASS | PASS | PASS | FAIL | — |
| Check if the default namespace is correctly reset. | PASS | PASS | PASS | PASS | FAIL | — |
| Check if there is no redundant empty namespace declaration. | PASS | PASS | PASS | PASS | FAIL | — |
| Check if redundant xmlns="..." is dropped. | PASS | FAIL | FAIL | PASS | FAIL | — |
| Check if inconsistent xmlns="..." is dropped. | PASS | FAIL | FAIL | PASS | FAIL | — |
| Drop inconsistent xmlns="..." by matching on local name | FAIL | PASS | FAIL | FAIL | FAIL | — |
| Check if an attribute with namespace and no prefix is serialized with the nearest-declared prefix | PASS | PASS | PASS | FAIL | FAIL | — |
| Check if an attribute with namespace and no prefix is serialized with the nearest-declared prefix even if the prefix is assigned to another namespace. | FAIL | FAIL | FAIL | FAIL | FAIL | — |
| Check if the prefix of an attribute is replaced with another existing prefix mapped to the same namespace URI. | PASS | PASS | PASS | FAIL | FAIL | — |
| Check if the prefix of an attribute is NOT preserved in a case where neither its prefix nor its namespace URI is not already used. | FAIL | FAIL | FAIL | FAIL | FAIL | — |
| Check if the prefix of an attribute is replaced with a generated one in a case where the prefix is already mapped to a different namespace URI. | PASS | FAIL | PASS | FAIL | FAIL | — |
| Attribute value escapes: lt | PASS | PASS | PASS | PASS | FAIL | — |
| Attribute value escapes: gt | PASS | PASS | PASS | PASS | FAIL | — |
| Attribute value escapes: quot | PASS | PASS | PASS | PASS | FAIL | — |
| Attribute value escapes: apos | PASS | PASS | PASS | PASS | FAIL | — |
| [TENTATIVE] check XMLSerializer.serializeToString escapes attribute values for roundtripping | PASS | PASS | PASS | FAIL | FAIL | — |
| Check if attribute serialization takes into account of following xmlns:* attributes | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Check if attribute serialization takes into account of the same prefix declared in an ancestor element | PASS | FAIL | PASS | FAIL | FAIL | — |
| Check if start tag serialization drops element prefix if the namespace is same as inherited default namespace. | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Check if start tag serialization finds an appropriate prefix. | PASS | PASS | PASS | FAIL | FAIL | — |
| Check if end tag serialization matches start tag when an appropriate prefix is found. | PASS | PASS | PASS | FAIL | FAIL | — |
| Check if start tag serialization takes into account of its xmlns:* attributes | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Check if start tag serialization applied the original prefix even if it is declared in an ancestor element. | PASS | FAIL | PASS | FAIL | FAIL | — |
| Check if start tag serialization does NOT apply the default namespace if its namespace is declared in an ancestor. | FAIL | FAIL | FAIL | FAIL | FAIL | — |
| Check if end tag serialization matches start tag for elements in the XML namespace. | PASS | PASS | PASS | PASS | FAIL | — |
| Check if generated prefixes match to "ns${index}". | PASS | FAIL | PASS | PASS | FAIL | — |
| Check if "ns1" is generated even if the element already has xmlns:ns1. | FAIL | FAIL | FAIL | FAIL | FAIL | — |
| Check if no special handling for XLink namespace unlike HTML serializer. | PASS | FAIL | PASS | FAIL | FAIL | — |
| Check if document fragment serializes. | PASS | PASS | PASS | PASS | PASS | — |
| Check children were included for void elements | PASS | PASS | PASS | PASS | FAIL | — |
| Check if a prefix bound to an empty namespace URI ("no namespace") serialize | FAIL | PASS | PASS | FAIL | FAIL | — |
| Attribute nodes are serialized as the empty string | PASS | PASS | PASS | PASS | PASS | — |