XML DOM » Node » transformNodeToObject

Compability: Internet Explorer

node.transformNodeToObject(stylesheet, outputObject)
The output object contains the product of of the tranformation of this XML document based on the XSL stylesheet. If this is a Document object, it is built according to the stylesheet's properties, and its child nodes are replaced during the transformation process. The XML transformation can also be sent to a stream.
The 'stylesheet' parameter must be either a valid XML document (which is assumed to be an XSL stylesheet), or a DOM node from an XSL stylesheet, in which case the node is treated as a stand-alone stylesheet fragment.

The source node defines a context for the stylesheet to operate on, but navigation outside this scope is allowed.

This method supports both standalone and embedded style sheets, and additionally provides the ability to run a localized style sheet fragment against a particular source node.

This method processes this node and its descendants using the specified XSL stylesheet, and returns the resulting transformation in the specified object.