How to XSLT-transform in-memory xml DOM tree? For example I create(with DOM) in memory XML tree and want to XSLT-transform it. I want to omit phase of serializing created DOM tree in XML and then send xml serialized document to XSLT processor(that will waist time to deserialize it again). Just directly send DOM tree as input to XSLT processor. Implementation in MSXML is preferable.
With MSXML a DOM node exposes methods transformNode
(taking a DOM node with the stylesheet code as its argument and creating a string with the transformation result, see https://msdn.microsoft.com/en-us/library/ms761399%28v=vs.85%29.aspx) and transformNodeToObject
(taking a DOM node with the stylesheet code as its first argument and a result object like a stream or another DOM node as the second argument, see https://msdn.microsoft.com/en-us/library/ms766561%28v=vs.85%29.aspx) so it is easy to apply XSLT to a DOM node created in memory.