Name

XMLSerializer.serializeToString( ): convert an XML document or node to a string

Synopsis

String serializeToString(Nodenode)

Arguments

node

The XML node to be serialized. This may be a Document object or any Element within the document.

Returns

A string of XML markup that represents the serialized form of the specified node and all its descendants.

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.