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
Question 1 Discuss the following with respect to .NET Technologies Web Applications Web Server Connections Question 2 Write a sample program using ASP.NET explain

I need a Custom Report - Crystal Reports Project Description: I am seeking a custom report for our syrinx hire software, all reports are made from Crystal Reports. Skills

What are the four workflow principles? According to Microsoft, there are four main principles that define the behavior and working of workflows. Developers can use these princi

Hardware Monitor Tool in Visual Basic Project Description: Hi, seeking a developer who is experienced in Visual Basic 10 Or Visual Basic 13 and will develop an application li

This is a Customer Management project. Customer data is offered in a text file. The program may load this text data into its database columns. The data mapping is user definable. U

Name the control that exposes the LINQ features to Web developers through the ASP.NET data-source control architecture. The LinqDataSource control exposes the LINQ features to

Explain assemblies An assembly is a single deployable unit that having all the information about the implementation of : - classes - structures and - interfaces An

How can we connect to Microsoft Access, Foxpro , Oracle etc ? The Microsoft provides System.Data.OleDb namespace to communicate with the databases such as Oracle, scessĀ  etc. I

What is marshalling and types of marshalling? The Marshaling is used when an object is converted so that it can be sent across the network or across the application domains. Th

Construct a .NET wrapper for a C++ Dll - repost Project Description: We have a classic VC++ Dll (source code of DLL not required) that requires a .NET wrapper built by you. U