XmlDocument Input to XslTransform
The XmlDocument class provides editing capabilities for an XML document. If the XML needs to be edited or modified before being sent to the Transform method, load the XML into an XmlDocument, edit it, and send it in to the XslTransform.
The XslTransform class is obsolete in the .NET Framework 2.0. You can perform Extensible Stylesheet Language for Transformations (XSLT) transformations using the XslCompiledTransform class. See Using the XslCompiledTransform Class and Migrating From the XslTransform Class for more information.
Due to the editing capability of the XmlDocument, using the XmlDocument class as input to a transformation is slower than using an XPathDocument for the Extensible Stylesheet Language for Transformations (XSLT) transformations, as the XPathDocument is optimized for XML Path Language (XPath) queries due to the internal storage.