This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

serializeToString

Summary

Converts the parent DOM node of a document tree to an XML string.

Method of apis/xhr/objects/XMLSerializerapis/xhr/objects/XMLSerializer

Syntax

var object = object.serializeToString(pNode);

Parameters

pNode

Data-type
any

The parent DOM node of a document tree to convert to an XML string.

Return Value

Returns an object of type DOM NodeDOM Node

String

The string that contains an XML representation of a DOM node tree.

Examples

To use the serializeToString method, type the following syntax.

oXmlSerializer =  new XMLSerializer();
sXmlString = oXmlSerializer.serializeToString(oDOMNode);

See also

Related pages

Attributions