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
EMR ONC MU2 CERTIFICATION Project Description: We are looking for someone with experience in EMR MU2 certification per ONC needs. If you have experience and participate in

How to use ActiveX Control in .Net ? ActiveX control is a special type of COM component  that supports a User Interface. Using ActiveX Control in your .Net Project is even

What are different types of caching using in ASP.NET? You can use 2 types of output caching to cache information which is to be transmitted to and displayed in a Web browser:

I require a visual basic (VB) app developer to enhance an existing application. There are very few manual inputs in the application which I need to be imported via excel file. E

General Overview A number of organisations are using micro-blogging as a cost-effective way of communicating with customers, building online communities and releasing informatio

Need Experienced Outlook (Microsoft Office) developer Your required skills: (1) A developer at heart, one that knows how to prepare modular, well-designed and clean code, (2) va

What are shared (VB.NET)/Static(C#) variables? Shared/Static classes are used when a class gives functionality which is not specific to any instance. In brief if you want an ob

Concept of Boxing and Unboxing The Boxing permits any value type to be implicitly converted to type object or to any other interface type implemented by the value type. The Box

Differences between Datagrid, Datalist and Repeater?   1. Datagrid has paging whereas Datalist doesnt. 2. Datalist has a property called repeat. Direction = vertical/horizon

What are events? As compared to the delegates events works with source and listener methodology. So the listeners who are interested in receiving few events they subscribe to t