Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

XMLSerializer

Similar to standard XMLSerializer. Used to convert a DOM document into a valid XML string.

Class Constructor

XMLSerializer

Creates a new XMLSerializer object

Code Block
languagejs
var serializer = new XMLSerializer();

 

Initialization Parameters

 

None

 

Methods

Name Description 
serializeToString

Serialize a DOM document object to an XML string.

Basic Example:

Code Block
languagejs
var serializer = new XMLSerializer();
var xml = serializer.serializeToString(document);

Parameters

 

NameRequiredTypeDefaultDescription
document
Yes
  

DOM document object.