>Hi,
>
>How can I turn a XML file into a xml string.
>
>I have tried streamreader, xmltextreader, the output results only give me the text() part of xml file(all xml tags are not included).
>
>e.g. for a simple xml file:
>
>
>title1
>>
>The output is only "title1", but I want the whole thing. Can anyone help as to how i get the whole file to be converted into a string unsing vb.net
>
>Thanks for the help in advance.
>
>Bilal.
using System;
using System.IO;
class test
{
static void Main()
{
TextReader rdr = new StreamReader(@"C:\myPath\myxmlfile.xml");
string content = rdr.ReadToEnd();
rdr.Close();
Console.WriteLine(content);
}
}
Cetin