How to access attributes using "xmlreader", DOT NET Programming

How do we access attributes using "XmlReader"?

The below snippets represents the way to access attributes. At First in order to check whether there any attributes present in the current node you can use "HasAttributes" function and use the "MoveToNextAttribute" method to move forward in attribute. Just in case you want to move to the next element use "MoveToElement()".

if (reader.HasAttributes)

{

while(reader.MoveToNextAttribute())

{

// your logic goes here

string pdata = reader.Value

}

}

reader.MoveToElement();

Posted Date: 9/25/2012 2:57:57 AM | Location : United States







Related Discussions:- How to access attributes using "xmlreader", Assignment Help, Ask Question on How to access attributes using "xmlreader", Get Answer, Expert's Help, How to access attributes using "xmlreader" Discussions

Write discussion on How to access attributes using "xmlreader"
Your posts are moderated
Related Questions
What is the difference between "Web farms" and "Web garden"? The "Web farms" are used to have some redundancy to reduce the failures. It consists of two or more web server of t

We need programmers and accountants Skills required are .NET, C# Programming, Graphic Design, Commercials, Software Architecture

If one of your validations is complicated and does not fit in any validators, what you do? The best way is to go for CustomValidators. The sample code for a custom validator

I need Windows 8.1 Project, Asset management slate App Project Description: We are seeking a Windows 8 app developer with PROVABLE experience to prepare a project and asset m

Give a brief introduction on side-by-side execution. Can two applications, one using private assembly and the other using the shared assembly be stated as side-by-side executables?

inheritance real time examples

Import Columns of Data into Data Table for Data Grid View in C# and WPF Need help with a project in C# / WPF. Trying to read a csv file or text file with columns of data that wi

Define an event. Whenever an action takes place in a class, that class gives a notification to other classes or objects that are assigned to perform certain tasks. These notifi

What is the difference between Stored Procedure (SP) and User Defined Function (UDF)? Some of major differences between a stored procedure and user defined are as follows:-

Project Description:                                   Urgently require an expert with good knowledge of writing experience and UML diagrams. This project requires technologi