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 Dataset object ? The DataSet gives the basis for the disconnected storage and manipulation of the relational data. We fill it from the  data store, work with it while d

recipe house Project Description: Web application with sql database Skills required are .NET, C# Programming, HTML, PHP, SQL

Could you please explain to me the different types of DOT NET programming

I want .Net Programmer for custom grid web application Need programmer to support in the development of an ASP .Net interface. Project will make extensive utilize of custom grid

Project Description: PURPOSE Xconnect needs a fully automated system for receiving and processing Terminator cost sheets based on set business principle, convert the accepted


What are the steps to create a webservice? This webservice will add 2 numbers and send  to the calling client.All the below steps shown are according to VS2005 beta editor :-

What is the difference between the Clone() and Copy() methods of the DataSet class? The Clone() method copies only the structure of a DataSet. The copied structure having all t

What is difference between abstract classes and interfaces? The difference b/w abstract and interfaces are s follows:- 1.     The Abstract classes can have concrete methods

How inheritance is achieved in VB.NET? The Inheritance is achieved by using "Inherits" keyword in the VB.NET (& For C# it is ":"). Easy Sample is provided in CD for understandi