XML DOM transformToFragment() method

Definition and usage

The transformToFragment() method of the XML DOM transforms a node or document into a DocumentFragment.

Syntax:

transformToFragment(Source,Owner)
Parameters Description
Source The document or node to be transformed.
Owner The document created by the DocumentFragment returned. The ownerDocument property of the returned DocumentFragment refers to this document.

Return value

Saved transformation results DocumentFragment object.

Description

This method performs an XSLT transformation on a specified node once, and the result is DocumentFragment objectReturn. Transform the XSLT style sheet specified by importStylesheet() and the parameter values specified by setParameter(). The returned fragment is inserted into the specified owner document.