Simple walk through of xmlreader, DOT NET Programming

Explain simple Walk through of XmlReader.

In this part we will do a simple walkthrough of how to use the "XmlReader" class. The Sample for the same is available in both languages (i.e. in C# and VB.NET) which you can find in "WindowsApplicationXMLVBNET" and "WindowsApplicationCSharp" folders. The Task is to load "TestingXML.XML" file and display its data in a message box. You can find "TestingXML.XML" file in "BIN" directory of both folders. Below is the display of the "TestingXML.XML" file and its content.

1137_XML reader.png

Figure: - Testing.XML Data

The both projects have command button "CmdLoadXML" which has the logic to load the XML file and display the data in the messagebox. I have pasted only the "CmdLoadXML" command button logic for simplicity. Following are some basic steps done:-

(i)Declared the "XMLTextReader" object and gave the XML file name to load the XML data.

(ii)Read the "XMLTextReader" object until it has data and concatenate the data in the temporary string.

(iii)Finally display the similar in a message box.

2402_XML reader1.png

 

Figure: - VB.NET code for XMLReader

Same holds true for C# code as shown below:

1295_XML reader2.png

Figure: - C# code for XMLReader

718_XML reader3.png

Figure: - Data Display for "TestingXML.XML"

Posted Date: 9/25/2012 3:02:21 AM | Location : United States







Related Discussions:- Simple walk through of xmlreader, Assignment Help, Ask Question on Simple walk through of xmlreader, Get Answer, Expert's Help, Simple walk through of xmlreader Discussions

Write discussion on Simple walk through of xmlreader
Your posts are moderated
Related Questions
Downloadable software for a PC computer and Mac Project Description: "The software" can be sold as a downloadable purchase. I must have all copy rights to "the software" when

TASK - DESIGN ALGORITHM You are required to design a suitable solution algorithm by using either structured chart, pseudocode or flowchart. This diagram should clarify the proce

I have the project that takes screen shots and saves in the specific folder.(eg.Screen0001) but the problem is that if i close application and run it again then it replace the exis

how to access global resource file using javascript

I am looking for learning management software (LMS) preferably in ASP.NET and Microsoft SQL/ MYSQL server as the database. The broad scope of the system could be 1. User managem

What are resource files? The Resource files are the files which contain program resources. Many programmers think that resource files are used only for storing strings. But you


Project Description: We have a web based program prepared with .NET C# and Microsoft SQL Server. There are some reports needs to be created. Required Skills. - High Pro

What is project management? Applying the knowledge, skills, techniques, tools in project and deliver project deliverable is a short definition of the project management. It's b

Explain the concept of constructor? Constructor is a special method of a class, which is called automatically when the instance of a class is formed. It is created with the sam