I am new to vb this is the code i am working on:
Dim InputDoc As XmlDocument = New XmlDocument()
InputDoc.LoadXml(tem)
Dim Transformer As XslCompiledTransform = New XslCompiledTransform()
Transformer.Load(Server.MapPath("D/" & T))
Dim xmlCtl As System.Web.UI.WebControls.Xml = New System.Web.UI.WebControls.Xml
xmlCtl.Document = InputDoc
xmlCtl.Transform = Transformer
Controls.Add(xmlCtl)
I changed XslTranform to XslCompiledTranform – is this right thing to do?
But i am still getting few other errors as xmlCtl.Document is obselete and value of xmlCtl.Transform cannot be converted to Transformer. I am using .Net 4.0 . Can anybody please tell me how to resolve these?
As to this post yes that is the right thing to do.
Apparently there is an issue with memory leakage when transforming large documents. So i guess be wary of that.
This would be right if you were not going to have XSLT transformations.
But you want to use XSLT, so that will not work.
Create an
XPathDocumentand callCreateNavigator()Use XPathNavigator to execute an XSLT transformation.
This post talks about working with xml web controls and xslt.
You may want to take a look at this as well.
This uses XslCompiledTransform and is supposed to be a replacement of the ASP.NET Xml control. Will work with integrating
XSLCompiledTransformAnyways i hoped some of this helped.