XML DOM transformToFragment() method
Definition and usage
The transformToFragment() method of the XML DOM converts 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
A DocumentFragment that saves the transformation result DocumentFragment object.
Description
This method performs an XSLT transformation on a specified node once, and the result is a DocumentFragment objectReturn. Convert using the XSLT stylesheet specified by importStylesheet() and the parameter values specified by setParameter(). The returned fragment is inserted into the specified owner document.