I am trying to use SaveAsXml to save to a stream but cannot find a stream that will work... I have tried StringWriter but it won't pass the syntax check and you cannot create a generic stream. What streams work. I just want a string of the XML
Visual Basic if possible please.
Please take a look at the following link in which you could find a Visual Basic example as well:
Please do not hesitate to contact me if you need any additional assistance.
So I guess judging from the example, the only save supported is to an actual file, which is not what I want becuase I want to store the results in a database, so I guess I will have to create a temp file, write out the settings, then read them back in, place the string in the database, and then delete the temp file.
This sounds a bit more complicated but it has to work, bottom line - the steps about saving and loading the file will increase by two. Please do not hesitate to ask if something comes up.
wltaylor said:So I guess judging from the example, the only save supported is to an actual file,
No, that is not correct. You can save to either a file or a stream. If you want to save the layout to a database, then I suggest using a MemoryStream. Here's a KB article which describes how to do this:
HOWTO:How can I save a stream to a database?