Writing text stream in VB6

I had rather unusual experience of writing VB6 code in 2007. I had to support one of old applications, written probably around 2001. It is to write XML file into text stream. The codes are like the followings.

Dim objXMLResult As MSXML2.FreeThreadedDOMDocument30
Set objXMLResult = New MSXML2.FreeThreadedDOMDocument30

Dim objProcessor As MSXML2.IXSLProcessor
Set objProcessor = objXSLTemplate.createProcessor
objProcessor.input = objXMLDoc
objProcessor.addParameter "SiteID", 4
'objProcessor.output = objResultStream

Dim translateXml As String
Dim objFileSystem As New FileSystemObject
Dim objStream As TextStream
objFileSystem.CreateTextFile "c:\temp\XslResult.txt", True, True
Set objStream = objFileSystem.OpenTextFile("c:\temp\XslResult.txt", ForWriting)

translateXml = objProcessor.output
objStream.Write translateXml


One thought on “Writing text stream in VB6

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s