Programmer99
MIS
I'm having trouble writing to a file using the XMLTextWriter. I have to trouble writing to the Console but can't get it to a file. Here is a sample.
Private Sub WriteXML()
Dim filename = "c:\temp\response.txt"
'Dim writer As New XmlTextWriter(Console.Out) 'this works
Dim writer As New XmlTextWriter(filename) 'this doesn't
writer.Formatting = Formatting.Indented
writeQuote(writer)
writer.Close()
End Sub
Any idea why it doesn't work when I use filename? Thanks.
Private Sub WriteXML()
Dim filename = "c:\temp\response.txt"
'Dim writer As New XmlTextWriter(Console.Out) 'this works
Dim writer As New XmlTextWriter(filename) 'this doesn't
writer.Formatting = Formatting.Indented
writeQuote(writer)
writer.Close()
End Sub
Any idea why it doesn't work when I use filename? Thanks.