0

c# and XMLreader

how to write c# program for reading this xml file <?xml version = "1.0"?> <contact-info> <name>Tanmay Patil</name> <company>TutorialsPoint</company> <phone>(011) 123-4567</phone> </contact-info> using XMLREADER class

12th Jul 2017, 4:16 AM
muhamad hardaniyan
muhamad hardaniyan - avatar
2 Respuestas
+ 1
https://www.dotnetperls.com/xmlreader string NodeName; // Create an XML reader for this file. using (XmlReader reader = XmlReader.Create("c:\\Temp\\TestXMLReader.xml")) { while (reader.Read()) { // Only detect start elements. if (reader.IsStartElement()) { NodeName = reader.Name; // Next read will contain text. if (reader.Read()) { MessageBox.Show(NodeName + " " + reader.Value.Trim()); } } } }
12th Jul 2017, 9:32 PM
sneeze
sneeze - avatar
0
thanks so much i must study more xml
13th Jul 2017, 10:44 AM
muhamad hardaniyan
muhamad hardaniyan - avatar