A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/XMLSerializer/XMLSerializer below:

XMLSerializer: XMLSerializer() constructor - Web APIs

XMLSerializer: XMLSerializer() constructor

Baseline Widely available

The XMLSerializer() constructor creates a new XMLSerializer.

Syntax Parameters

None.

Return value

A new XMLSerializer object.

Examples Serializing XML into a string

This example serializes an entire document into a string containing XML.

const s = new XMLSerializer();
const d = document;
const str = s.serializeToString(d);
saveXML(str);

This involves creating a new XMLSerializer object, then passing the Document to be serialized into serializeToString(), which returns the XML equivalent of the document. saveXML() represents a function that would then save the serialized string.

Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4