Article ID: 318580 - View products that this article applies to.
This article was previously published under Q318580
This article has been archived. It is offered "as is" and will no longer be updated.
XSL transformations (XSLT) with System.Xml.XmlDataDocument may run more slowly than XSLT with XPathDocument or XmlDocument.
XmlDataDocument is primarily designed to act as the bridge between the DataSet and XML.
Run XSL transformations by using the XmlDocument or XPathDocument classes instead of XmlDataDocument. Microsoft recommends that you use XPathDocument, because it is highly optimized for XSL transformations. See the "More Information" section of this article for a code sample that uses the XPathDocument.
This behavior is by design. The XmlDataDocument class is primarily designed for synchronizing XML with DataSet. Microsoft is looking into improving its performance for transformations in the next major release of Visual Studio .NET.
The following is a Visual Basic .NET code sample that shows you how to apply XSL transformations on a DataSet by using the XPathDocument class. The sample initially loads the data from the Customers table and the Order table of the Northwind database into to a DataSet, and then the DataSet is transformed with the XmlDataDocument and XPathDocument classes.
Steps to Reproduce the Behavior
For more information, click the links below to view the Software Developer Kit (SDK) documentation and the Microsoft Knowledge Base articles:
313651To view the Software Developer Kit (SDK) documentation, visit the following Microsoft Web site:
(http://support.microsoft.com/kb/313651/EN-US/ )ROADMAP for XML in the .NET Framework
Contact us for more help
Connect with Answer Desk for expert help.