System.Xml.Xsl.XslCompiledTransform Class

Transforms XML data using an XSLT style sheet.

See Also: XslCompiledTransform Members

Syntax

public sealed class XslCompiledTransform

Remarks

The System.Xml.Xsl.XslCompiledTransform class is an XSLT processor that supports the XSLT 1.0 syntax. It is a new implementation and includes performance gains when compared to the obsolete System.Xml.Xsl.XslTransform class. The structure of the System.Xml.Xsl.XslCompiledTransform class is very similar to the System.Xml.Xsl.XslTransform class. The erload:System.Xml.Xsl.XslCompiledTransform.Load method loads and compiles the style sheet, while the erload:System.Xml.Xsl.XslCompiledTransform.Transform method executes the XSLT transform.

Support for the XSLT document() function and embedded script blocks are disabled by default. These features can be enabled by creating an System.Xml.Xsl.XsltSettings object and passing it to the erload:System.Xml.Xsl.XslCompiledTransform.Load method.

For more information, see Using the XsltCompiledTransform Class and Migrating From the XslTransform Class.

Security Considerations

When creating an application that uses the System.Xml.Xsl.XslCompiledTransform class, you should be aware of the following items and their implications:

These security issues can be mitigated by not enabling scripting or the document() function unless the style sheet comes from a trusted source, and by not accepting System.Xml.Xsl.XslCompiledTransform objects, XSLT style sheets, or XML source data from an untrusted source.

Requirements

Namespace: System.Xml.Xsl
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0