To XSLT a large file (.NET1.1)

To XSLT a large file use XPathDocument rather than XmlDocument, e.g. Slower: Me.m_oldStream.Position = 0Dim xsl As New Xml.Xsl.XslTransformxsl.Load(Me.m_xsltFilePath)Dim xDoc As New Xml.XmlDocumentxDoc.Load(Me.m_oldStream)xsl.Transform(xDoc, Nothing, Me.m_newStream, Nothing)Me.m_newStream.Flush() Faster: Me.m_oldStream.Position = 0Dim xslt As XslTransform = New XslTransformxslt.Load(Me.m_xsltFilePath)Dim doc As XPathDocument = New XPathDocument(Me.m_oldStream)xslt.Transform(doc, Nothing, Me.m_newStream, Nothing)Me.m_newStream.Flush() http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/ScaleNetChapt09.asp claims 20-30% faster processing.In one extreme example of a project I have worked on, [...]

Add comment

Loading