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 a Class in dot Net? The class describes all the attributes of objects, as well as the methods which implement the behavior of member objects. It is a comprehensive data


What is Post Cache substitution? The Post cache substitution is used when we want to cache the complete page but also require some of the dynamic region inside that cached page

What is the difference between delegate and events? Actually events use delegates in the bottom. But they also add an extra layer on the delegates, hence forming the publisher

What is V model in testing? The V model map's the type of test to the stage of development in the project. Figure: - V Model 1) Unit Testing: The Starting fro

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

Project Description: We require some routines written in C# (.NET) to: * Parse several RESTful APIs to change and push data to RabbitMQ * Pop objects from RabbitMQ and inp

Project Description: I need to get lync server 2013 fixed the issues it has hit: 1) Can't connect to it outside network, I think small firewall problem with a little issue in

What are the different types of workflow in WF? In WF 4.0, the following two types of workflows are used: Flowchart workflows - Helps you to make workflows using the commo

What are benefits and limitations of using Hidden frames 1)    The benefits of using hidden frames are as follows: 2)    More than one data field can cache. 3)    The abi