How to read a XML format file to memory in C#?
- by Nano HE
// .net 2.0 and vs2005 used.
I find some code below.
I am not sure I can extended the sample code or not? thank you.
if (radioButton.Checked)
{
MemoryStream ms=new MemoryStream();
byte[] data=ASCIIEncoding.ASCII.GetBytes(textBox1.Text);
ms.Write(data,0,data.Length);
reader = new XmlTextReader(ms);
//some procesing code
ms.Close();
reader.Close();
}
BTW, Could you please help me to do some dissection about the line below.
byte[] data=ASCIIEncoding.ASCII.GetBytes(textBox1.Text);