Saving a XML document to memory

C

C#Schroeder

I am creating an XML document on my C drive using the
XMLSerialization. I need to save the XML document into memory rather
then onto my C drive. What is the best way for me to do this? Thanks
in advance for your help
 
G

Guest

Stick it in a Generic List or Dictionary, or a Hashtable, or even an
ArrayList. Choice is yours depending on what qualities you need
programmatically.
If you don't need an object, you could even store it in the AppDomain Cache
with:
AppDomain.CurrentDomain.SetData("mydoc1", theXmlDocumentObject);

and get it back with

XmlDocument myDoc = (XmlDocument)AppDomain.CurrentDomain.GetData("mydoc1");

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top