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 DBMS? It is a collection of programs that enables user to make and maintain a database. In other words it is general-purpose software that gives the users with the proc

What are the best practices while implementing globalization and localization? The best methods while developing international language support software are shown below:- 1)

Project Description: I am preparing a speech recognition program and need a quick code to get it done I am seeking for someone to create a Gmail API that can get subject, and co

What is XPath? XPath stands for XML Path. It is a language used to access dissimilar parts of an XML document, such as elements and attributes.

Add in bitcoin payment option in website Project Description: Include bitcoin files to magento for payment options on website. It is just including the files to the magent

What are Value types and Reference types The Value types directly contain their data which are either allocated on the stack or allocated in-  Line in a  structure. The Refe

Urgently seeking a senior Extjs developer with strong NET developing skill Project Description: Urgently seeking a senior Extjs developer with strong NET developing skill

What are code contracts? Code contracts help you to state the code assumptions and statements stating the behavior of your code in a language-neutral way. The contracts are con

What is triple constraint triangle?   Figure: -Project Management Triangle The Project Management triangle is depicted as Cost, Schedule & scope. These 3 aspects for

Passport authentication A centralized service given by Microsoft, offers a single logon point for clients. Unauthenticated users are redirected to the Passport site