Saving XML to memory stream and retriving from memory stream RRS feed

  • Question

  • I have created a code that will write xml document on a memory stream.

    System.IO.MemoryStream ms = new System.IO.MemoryStream();

    Now, my problem is, how can I retrive the xml in the memory stream?

    I have tried, the following:

    XDocument doc = XDocument.Parse(Convert.ToBase64String(ms.ToArray()));

    But it apparently does not work.


    Any help is greatly appreciated.

    The more I study, the more I realize how little I know.
    Monday, January 10, 2011 6:28 AM