How do I take a string of XML and make it a document again?

  • Thread starter Thread starter acool
  • Start date Start date
A

acool

I am passing in, as a parameter, a string of XML, and want to formulate a
new XML docuent but i am getting errors. I tried this:

public string makeDoc(string document)
{
//
XmlDocument doc = new XmlDocument();
doc.Load(document);
}

Does anyone knw how I can do this?
 
try thi

doc.LoadXml(document)

The LoadXml method is for loading a string of data, as the Load method is more for loading a file, Reader or stream

Keenan Newton
 
Back
Top