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
ILDASM When it comes to the understanding of the internals nothing can beat ILDASM. ILDASM  converts all the exe or dll into IL code. To run ILDASM you have to go to "C:\Progra

I need mt4 programmer Project Description: I'm seeking a professional programmer to teach me MQL I have few years experience in manual trading but totally NONE in MT4 / EA

Project Description: General information for the business: Call Accounting and Billing Kind of development: New program from scratch Description of each module: Call Accou

Briefly explain what user controls are and what server controls are and the differences among the two.   An ASP.NET control (sometimes known as a server control) is a server-si

Social Media project Project Description: It's a Windows Phone application which requires the subsequent capabilities: -Live Video Streaming -Social Networking capabili

Project Description: We want to prepare a package forwarding website. Package forwarding refers to a service where US forwarder provides International shoppers with a US address

The ASP.NET provides two namespaces. The first is System.WEB.mailmessage class and the second is System.Web.Mail.Smtpmail class.

Finding Average of Array Elements - C# Program I need assignment help for Finding Average of Array Elements in C#. Can anybody send me there ideas?

I am looking individuals who have company experience working on Jquery and Microsoft Technology ( MVC 4.5 ), who will take live online session and provide training through Team Vie