Using system.io; using system.xml;
Public class sample {public static void main () {xmlTextReader Reader = NULL;
Try {// load. Reader = New XmlTextReader ("Elems.xml"); // Parse the xml and display the text content of each of the elements. While (Reader.Read ()) {ix ({if ("<{0} />", reader.name); {0} /> "; else {console.write (" <{0}> ", reader.name) Reader.read (); // read the start tag. If (Reader.IstartElement ()) // Handle Nested Elements. Console.write ("/ R / N <{0}>", Reader.Name); Console .Writeline ()); // read the text content of the element.}}}} Finary}}}} finary}}}}}}}}}}}}}}} // End class;