Sure, create an XmlDocument object:
XmlDocument xmldoc = new XmlDocument();
Then call the LoadXml method to parse in a string...
xmldoc.LoadXml(szXmlString);
You put XML file though? What do you mean by file? The above loads the XML
string into the XML Dom object, but that's only in the memory... If you want
to stream it to a file, then what you do is this...
StreamWriter wrtr = File.CreateText( "<<myfilename.xml>>" );
wrtr.Write( szXmlString );
wrtr.Flush();
wrtr.Close();
anymore questions, lemme know.
Dan.
"Mike P" <mr*@telcoelectronics.co.uk> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
Is it possible to convert a string to XML? I have an XML document
coming in to my web page through Request.QueryString"xml" as a string.
I need to create a new XML file made up of the XML in this string. Can
anybody help me out?
Cheers,
lfc77
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!