0

To open a file I could do this like

Process.Start(fileName)

For this it is necessary that the file exists in the file system. Now I use a XmlDocument object and want to open the content in an external program like Notepad. I save the xml content in a stream but have no idea how to show it in another program.

Dim MyXmlDocument As New XmlDocument

'do something with the document

MyXmlDocument.Save(MyXmlStream)

If it isn't possible I have to save it first and open it in a second step. I only want to avoid the saving of the file in the file system.

T.S.
  • 18,195
  • 11
  • 58
  • 78
mburm
  • 1,417
  • 2
  • 17
  • 37

1 Answers1

0

I think it is necessary to save in the file system. However, you could create a temporary file and execute a delete command when you're finished with the file. This way it does not clutter the FileSystem. The AppData folder is a good place to start.

Kraxed
  • 352
  • 2
  • 11
  • 26
  • My intention is to open the stream without using the file system. Which program is used doesn't matter for me. But it seems that I'm forced to save the stream in the file system and start a process with this file ... – mburm Apr 17 '13 at 09:07
  • 1
    I think it is necessary to save in the file system. However, you could create a temporary file and execute a delete command when you're finished with the file. This way it does not clutter the FileSystem. The `AppData` folder is a good place to start. – Kraxed Apr 17 '13 at 09:14
  • That also was my guess. Then I have to do it like this. Thanks. – mburm Apr 17 '13 at 09:21