Convert String to XMLDocument object

  • Thread starter Thread starter pei_world
  • Start date Start date
Pei,

If your string is wellformed xml then you could create an XmlDocument
from it by using

XmlDocument doc = new XmlDocument();
doc.LoadXml(myString);

where myString is the string which contains your wellformed xml data.

Hope this helps,

//Andreas
 
Ravichandran J.V. said:
Use the XMLDocument object and load the string

xmDocObj.Load("String")

Not quite - it's the LoadXml method. Load(string) will treat the given
string as a URL.
 
Back
Top