What is the non-obsolete way to do the same thing?

  • Thread starter BrianProgrammer
  • Start date
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?
 
B

BrianProgrammer

Nevermind. This was just recently answered in
microsoft.public.dotnet.xml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top