B
BrianProgrammer
I have this code below, that works like a champ, but two lines are
continually marked as obsolete. See embeded notes.
Private Shared Function TransformHTMLString(ByVal XSLT As String, _
ByVal XHTML As String) _
As String
Dim xdoc As Xml.XmlDocument = New Xml.XmlDocument
xdoc.LoadXml(XHTML)
Dim xsDoc As Xml.XmlDocument = New XmlDocument
xsDoc.LoadXml(XSLT)
'Both lines that are marked as obsolete are tagged that way
'by VS.Net2003. It is because I am passing an XMLDocument
'rather than a resolver
Dim xformer As Xml.Xsl.XslTransform = New Xml.Xsl.XslTransform
xformer.Load(xsDoc) 'Marked as obsolete
Dim writer As StringWriter = New StringWriter
xformer.Transform(xdoc, Nothing, writer) 'Marked as obsolete
Dim rtf As String = writer.ToString()
writer.Close()
Return rtf
End Function
What is the non-obsolete way to do the same thing?
continually marked as obsolete. See embeded notes.
Private Shared Function TransformHTMLString(ByVal XSLT As String, _
ByVal XHTML As String) _
As String
Dim xdoc As Xml.XmlDocument = New Xml.XmlDocument
xdoc.LoadXml(XHTML)
Dim xsDoc As Xml.XmlDocument = New XmlDocument
xsDoc.LoadXml(XSLT)
'Both lines that are marked as obsolete are tagged that way
'by VS.Net2003. It is because I am passing an XMLDocument
'rather than a resolver
Dim xformer As Xml.Xsl.XslTransform = New Xml.Xsl.XslTransform
xformer.Load(xsDoc) 'Marked as obsolete
Dim writer As StringWriter = New StringWriter
xformer.Transform(xdoc, Nothing, writer) 'Marked as obsolete
Dim rtf As String = writer.ToString()
writer.Close()
Return rtf
End Function
What is the non-obsolete way to do the same thing?