Is there a way to load xml file contents into a string variable without copy/paste by user in C#??
Posted on 2007-07-23
This question pertains to C#
Is there a function in C# to acess an XML file and store its contents (less the first line) to a string variable. I have achieved this in a windows application by copy/paste xml elements into a rich text box control. Then setting the text proprty of rtb control to a string variable:
//variable to hold the xml txt which is pasted into rich text box
string RtRcp= rtbProcessRtRcp.Text;
Is there a way for this to happen automatically without having to actually copy and paste into a rich text box? Is there a function that will access the file and copy its contents (elements only) into a string variable??